Mercurial > emacs
comparison src/buffer.c @ 8873:b58ea8cae183
(reset_buffer): Don't call reset_buffer_local_variables.
(Fget_buffer_create): Call it here.
(init_buffer_once): And here.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sun, 18 Sep 1994 08:46:34 +0000 |
| parents | 41981db9ad8e |
| children | 644f69fe736e |
comparison
equal
deleted
inserted
replaced
| 8872:0f20e5e19ed6 | 8873:b58ea8cae183 |
|---|---|
| 258 b->undo_list = Qnil; | 258 b->undo_list = Qnil; |
| 259 else | 259 else |
| 260 b->undo_list = Qt; | 260 b->undo_list = Qt; |
| 261 | 261 |
| 262 reset_buffer (b); | 262 reset_buffer (b); |
| 263 reset_buffer_local_variables (b); | |
| 263 | 264 |
| 264 /* Put this in the alist of all live buffers. */ | 265 /* Put this in the alist of all live buffers. */ |
| 265 XSET (buf, Lisp_Buffer, b); | 266 XSET (buf, Lisp_Buffer, b); |
| 266 Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil)); | 267 Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil)); |
| 267 | 268 |
| 289 call0 (function); | 290 call0 (function); |
| 290 | 291 |
| 291 return unbind_to (count, buf); | 292 return unbind_to (count, buf); |
| 292 } | 293 } |
| 293 | 294 |
| 294 /* Reinitialize everything about a buffer except its name and contents. */ | 295 /* Reinitialize everything about a buffer except its name and contents |
| 296 and local variables. */ | |
| 295 | 297 |
| 296 void | 298 void |
| 297 reset_buffer (b) | 299 reset_buffer (b) |
| 298 register struct buffer *b; | 300 register struct buffer *b; |
| 299 { | 301 { |
| 313 XFASTINT (b->overlay_center) = 1; | 315 XFASTINT (b->overlay_center) = 1; |
| 314 b->mark_active = Qnil; | 316 b->mark_active = Qnil; |
| 315 | 317 |
| 316 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */ | 318 /* Only defined if Emacs is compiled with USE_TEXT_PROPERTIES */ |
| 317 INITIALIZE_INTERVAL (b, NULL_INTERVAL); | 319 INITIALIZE_INTERVAL (b, NULL_INTERVAL); |
| 318 | 320 } |
| 319 reset_buffer_local_variables(b); | 321 |
| 320 } | 322 /* Reset buffer B's local variables info. |
| 323 Don't use this on a buffer that has already been in use; | |
| 324 it does not treat permanent locals consistently. | |
| 325 Instead, use Fkill_all_local_variables. */ | |
| 321 | 326 |
| 322 reset_buffer_local_variables (b) | 327 reset_buffer_local_variables (b) |
| 323 register struct buffer *b; | 328 register struct buffer *b; |
| 324 { | 329 { |
| 325 register int offset; | 330 register int offset; |
| 2372 register Lisp_Object tem; | 2377 register Lisp_Object tem; |
| 2373 | 2378 |
| 2374 /* Make sure all markable slots in buffer_defaults | 2379 /* Make sure all markable slots in buffer_defaults |
| 2375 are initialized reasonably, so mark_buffer won't choke. */ | 2380 are initialized reasonably, so mark_buffer won't choke. */ |
| 2376 reset_buffer (&buffer_defaults); | 2381 reset_buffer (&buffer_defaults); |
| 2382 reset_buffer_local_variables (&buffer_defaults); | |
| 2377 reset_buffer (&buffer_local_symbols); | 2383 reset_buffer (&buffer_local_symbols); |
| 2384 reset_buffer_local_variables (&buffer_local_symbols); | |
| 2378 XSET (Vbuffer_defaults, Lisp_Buffer, &buffer_defaults); | 2385 XSET (Vbuffer_defaults, Lisp_Buffer, &buffer_defaults); |
| 2379 XSET (Vbuffer_local_symbols, Lisp_Buffer, &buffer_local_symbols); | 2386 XSET (Vbuffer_local_symbols, Lisp_Buffer, &buffer_local_symbols); |
| 2380 | 2387 |
| 2381 /* Set up the default values of various buffer slots. */ | 2388 /* Set up the default values of various buffer slots. */ |
| 2382 /* Must do these before making the first buffer! */ | 2389 /* Must do these before making the first buffer! */ |
