struct buffer *current_buffer; /* the current buffer */
/* First buffer in chain of all buffers (in reverse order of creation).
- Threaded through ->next. */
+ Threaded through ->header.next.buffer. */
struct buffer *all_buffers;
int last_per_buffer_idx;
-INFUN (Fset_buffer_major_mode, 1);
-INFUN (Fdelete_overlay, 1);
+static Lisp_Object Fset_buffer_major_mode (Lisp_Object);
+static Lisp_Object Fdelete_overlay (Lisp_Object);
static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay,
int after, Lisp_Object arg1,
Lisp_Object arg2, Lisp_Object arg3);
b->prevent_redisplay_optimizations_p = 1;
/* Put this on the chain of all buffers including killed ones. */
- b->next = all_buffers;
+ b->header.next.buffer = all_buffers;
all_buffers = b;
/* An ordinary buffer normally doesn't need markers
BVAR (b, width_table) = Qnil;
/* Put this on the chain of all buffers including killed ones. */
- b->next = all_buffers;
+ b->header.next.buffer = all_buffers;
all_buffers = b;
name = Fcopy_sequence (name);
GCPRO1 (buffer);
- for (other = all_buffers; other; other = other->next)
+ for (other = all_buffers; other; other = other->header.next.buffer)
/* all_buffers contains dead buffers too;
don't re-kill them. */
if (other->base_buffer == b && !NILP (BVAR (other, name)))
{ /* This is probably harder to make work. */
struct buffer *other;
- for (other = all_buffers; other; other = other->next)
+ for (other = all_buffers; other; other = other->header.next.buffer)
if (other->base_buffer == other_buffer
|| other->base_buffer == current_buffer)
error ("One of the buffers to swap has indirect buffers");
/* Copy this buffer's new multibyte status
into all of its indirect buffers. */
- for (other = all_buffers; other; other = other->next)
+ for (other = all_buffers; other; other = other->header.next.buffer)
if (other->base_buffer == current_buffer && !NILP (BVAR (other, name)))
{
BVAR (other, enable_multibyte_characters)
static void
add_overlay_mod_hooklist (Lisp_Object functionlist, Lisp_Object overlay)
{
- int oldsize = XVECTOR (last_overlay_modification_hooks)->size;
+ int oldsize = ASIZE (last_overlay_modification_hooks);
if (last_overlay_modification_hooks_used == oldsize)
last_overlay_modification_hooks = larger_vector
buffer_local_symbols.text = &buffer_local_symbols.own_text;
BUF_INTERVALS (&buffer_defaults) = 0;
BUF_INTERVALS (&buffer_local_symbols) = 0;
- XSETPVECTYPE (&buffer_defaults, PVEC_BUFFER);
+ XSETPVECTYPESIZE (&buffer_defaults, PVEC_BUFFER, 0);
XSETBUFFER (Vbuffer_defaults, &buffer_defaults);
- XSETPVECTYPE (&buffer_local_symbols, PVEC_BUFFER);
+ XSETPVECTYPESIZE (&buffer_local_symbols, PVEC_BUFFER, 0);
XSETBUFFER (Vbuffer_local_symbols, &buffer_local_symbols);
/* Set up the default values of various buffer slots. */
DEFVAR_PER_BUFFER ("tab-width", &BVAR (current_buffer, tab_width),
make_number (LISP_INT_TAG),
- doc: /* *Distance between tab stops (for display of tab characters), in columns. */);
+ doc: /* *Distance between tab stops (for display of tab characters), in columns.
+This should be an integer greater than zero. */);
DEFVAR_PER_BUFFER ("ctl-arrow", &BVAR (current_buffer, ctl_arrow), Qnil,
doc: /* *Non-nil means display control chars with uparrow.