diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-09-06 13:15:44 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-09-06 13:15:44 +0400 |
commit | c752cfa916879f7415990855b52862dd585242ec (patch) | |
tree | 01e45e518004fb11b795072e060b2336847080dc /src/buffer.c | |
parent | 826b32357739a0ce755a5a2cadb3552b6914f4b3 (diff) | |
download | emacs-c752cfa916879f7415990855b52862dd585242ec.tar.gz |
Explicitly mark buffer_defaults and buffer_local_symbols.
* alloc.c (Fgarbage_collect): Mark buffer_defaults and
mark_local_symbols here.
(mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
since special buffers aren't marked here any more.
(allocate_buffer): Chain new buffer with all_buffers here...
* buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
not here.
(Vbuffer_defaults, Vbuffer_local_symbols): Remove.
(syms_of_buffer): Remove staticpro of the above.
(init_buffer_once): Set names for buffer_defaults and
buffer_local_symbols.
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/buffer.c b/src/buffer.c index 7698b72a3c6..187277d663b 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -60,10 +60,6 @@ struct buffer *all_buffers; struct buffer alignas (GCALIGNMENT) buffer_defaults; -/* A Lisp_Object pointer to the above, used for staticpro */ - -static Lisp_Object Vbuffer_defaults; - /* This structure marks which slots in a buffer have corresponding default values in buffer_defaults. Each such slot has a nonzero value in this structure. @@ -87,9 +83,6 @@ struct buffer buffer_local_flags; struct buffer alignas (GCALIGNMENT) buffer_local_symbols; -/* A Lisp_Object pointer to the above, used for staticpro */ -static Lisp_Object Vbuffer_local_symbols; - /* Return the symbol of the per-buffer variable at offset OFFSET in the buffer structure. */ @@ -595,10 +588,6 @@ even if it is dead. The return value is never nil. */) bset_width_table (b, Qnil); b->prevent_redisplay_optimizations_p = 1; - /* Put this on the chain of all buffers including killed ones. */ - b->header.next.buffer = all_buffers; - all_buffers = b; - /* An ordinary buffer normally doesn't need markers to handle BEGV and ZV. */ bset_pt_marker (b, Qnil); @@ -819,10 +808,6 @@ CLONE nil means the indirect buffer's state is reset to default values. */) b->width_run_cache = 0; bset_width_table (b, Qnil); - /* Put this on the chain of all buffers including killed ones. */ - b->header.next.buffer = all_buffers; - all_buffers = b; - name = Fcopy_sequence (name); set_string_intervals (name, NULL); bset_name (b, name); @@ -5145,10 +5130,11 @@ init_buffer_once (void) buffer_local_symbols.indirections = 0; set_buffer_intervals (&buffer_defaults, NULL); set_buffer_intervals (&buffer_local_symbols, NULL); + /* This is not strictly necessary, but let's make them initialized. */ + bset_name (&buffer_defaults, build_pure_c_string (" *buffer-defaults*")); + bset_name (&buffer_local_symbols, build_pure_c_string (" *buffer-local-symbols*")); XSETPVECTYPESIZE (&buffer_defaults, PVEC_BUFFER, pvecsize); - XSETBUFFER (Vbuffer_defaults, &buffer_defaults); XSETPVECTYPESIZE (&buffer_local_symbols, PVEC_BUFFER, pvecsize); - XSETBUFFER (Vbuffer_local_symbols, &buffer_local_symbols); /* Set up the default values of various buffer slots. */ /* Must do these before making the first buffer! */ @@ -5430,8 +5416,6 @@ syms_of_buffer (void) last_overlay_modification_hooks = Fmake_vector (make_number (10), Qnil); - staticpro (&Vbuffer_defaults); - staticpro (&Vbuffer_local_symbols); staticpro (&Qfundamental_mode); staticpro (&Qmode_class); staticpro (&QSFundamental); |