1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-29 07:58:28 +00:00

(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.
This commit is contained in:
Gerd Moellmann 2000-03-27 12:49:02 +00:00
parent c87a1fdaa8
commit ddebaaa9da

View File

@ -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))