Commit ddebaaa9 authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(MAX_PER_BUFFER_VARS): Renamed from MAX_BUFFER_LOCAL_VARS.

(PER_BUFFER_VAR_OFFSET): Renamed from BUFFER_LOCAL_VAR_OFFSET.
(PER_BUFFER_VAR_IDX): Renamed from BUFFER_LOCAL_VAR_IDX.
(PER_BUFFER_VALUE_P): Renamed from BUFFER_HAS_LOCAL_VALUE_P.
(SET_PER_BUFFER_VALUE_P): Renamed from SET_BUFFER_HAS_LOCAL_VALUE_P.
(PER_BUFFER_IDX): Renamed from BUFFER_LOCAL_IDX.
(PER_BUFFER_DEFAULT): Renamed from BUFFER_LOCAL_DEFAULT_VALUE.
(PER_BUFFER_VALUE): Renamed from BUFFER_LOCAL_VALUE.
(PER_BUFFER_SYMBOL): Renamed from BUFFER_LOCAL_SYMBOL.
(PER_BUFFER_TYPE): Renamed from BUFFER_LOCAL_TYPE.
parent c87a1fda
......@@ -482,8 +482,8 @@ struct buffer
for a buffer-local variable is stored in that variable's slot
in buffer_local_flags as a Lisp integer. If the index is -1,
this means the variable is always local in all buffers. */
#define MAX_BUFFER_LOCAL_VARS 30
char local_flags[MAX_BUFFER_LOCAL_VARS];
#define MAX_PER_BUFFER_VARS 50
char local_flags[MAX_PER_BUFFER_VARS];
/* Set to the modtime of the visited file when read or written.
-1 means visited file was nonexistent.
......@@ -863,12 +863,12 @@ extern char *r_re_alloc P_ ((char **, unsigned long));
/* Number of per-buffer variables used. */
extern int max_buffer_local_idx;
extern int last_per_buffer_idx;
/* Return the offset in bytes of member VAR of struct buffer
from the start of a buffer structure. */
#define BUFFER_LOCAL_VAR_OFFSET(VAR) \
#define PER_BUFFER_VAR_OFFSET(VAR) \
((char *) &buffer_local_flags.VAR - (char *) &buffer_local_flags)
/* Return the index of buffer-local variable VAR. Each per-buffer
......@@ -877,23 +877,23 @@ extern int max_buffer_local_idx;
0, this is a bug and means that the slot of VAR in
buffer_local_flags wasn't intiialized. */
#define BUFFER_LOCAL_VAR_IDX(VAR) \
BUFFER_LOCAL_IDX (BUFFER_LOCAL_VAR_OFFSET (VAR))
#define PER_BUFFER_VAR_IDX(VAR) \
PER_BUFFER_IDX (PER_BUFFER_VAR_OFFSET (VAR))
/* Value is non-zero if the variable with index IDX has a local value
in buffer B. */
#define BUFFER_HAS_LOCAL_VALUE_P(B, IDX) \
(((IDX) < 0 || IDX >= max_buffer_local_idx) \
#define PER_BUFFER_VALUE_P(B, IDX) \
(((IDX) < 0 || IDX >= last_per_buffer_idx) \
? (abort (), 0) \
: ((B)->local_flags[IDX] != 0))
/* Set whether per-buffer variable with index IDX has a buffer-local
value in buffer B. VAL zero means it hasn't. */
#define SET_BUFFER_HAS_LOCAL_VALUE_P(B, IDX, VAL) \
#define SET_PER_BUFFER_VALUE_P(B, IDX, VAL) \
do { \
if ((IDX) < 0 || (IDX) >= max_buffer_local_idx) \
if ((IDX) < 0 || (IDX) >= last_per_buffer_idx) \
abort (); \
(B)->local_flags[IDX] = (VAL); \
} while (0)
......@@ -901,29 +901,29 @@ extern int max_buffer_local_idx;
/* Return the index of the per-buffer variable at offset OFFSET in the
buffer structure. */
#define BUFFER_LOCAL_IDX(OFFSET) \
#define PER_BUFFER_IDX(OFFSET) \
XINT (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_flags))
/* Return the default value of the per-buffer variable at offset
OFFSET in the buffer structure. */
#define BUFFER_LOCAL_DEFAULT_VALUE(OFFSET) \
#define PER_BUFFER_DEFAULT(OFFSET) \
(*(Lisp_Object *)((OFFSET) + (char *) &buffer_defaults))
/* Return the buffer-local value of the per-buffer variable at offset
OFFSET in the buffer structure. */
#define BUFFER_LOCAL_VALUE(BUFFER, OFFSET) \
#define PER_BUFFER_VALUE(BUFFER, OFFSET) \
(*(Lisp_Object *)((OFFSET) + (char *) (BUFFER)))
/* Return the symbol of the per-buffer variable at offset OFFSET in
the buffer structure. */
#define BUFFER_LOCAL_SYMBOL(OFFSET) \
#define PER_BUFFER_SYMBOL(OFFSET) \
(*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_symbols))
/* Return the type of the per-buffer variable at offset OFFSET in the
buffer structure. */
#define BUFFER_LOCAL_TYPE(OFFSET) \
#define PER_BUFFER_TYPE(OFFSET) \
(*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_types))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment