diff options
| author | Gerd Moellmann | 2000-03-27 12:49:02 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-03-27 12:49:02 +0000 |
| commit | ddebaaa9da7734fff3f9f4a847670a63a876ae71 (patch) | |
| tree | 6cbe4a5ea6c75d2e28ee66300a700a4c6919a48f | |
| parent | c87a1fdaa84663c5fd2657ef70e8c3e487e551c8 (diff) | |
| download | emacs-ddebaaa9da7734fff3f9f4a847670a63a876ae71.tar.gz emacs-ddebaaa9da7734fff3f9f4a847670a63a876ae71.zip | |
(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.
| -rw-r--r-- | src/buffer.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/buffer.h b/src/buffer.h index 8223d438be5..7c17e9899ef 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -482,8 +482,8 @@ struct buffer | |||
| 482 | for a buffer-local variable is stored in that variable's slot | 482 | for a buffer-local variable is stored in that variable's slot |
| 483 | in buffer_local_flags as a Lisp integer. If the index is -1, | 483 | in buffer_local_flags as a Lisp integer. If the index is -1, |
| 484 | this means the variable is always local in all buffers. */ | 484 | this means the variable is always local in all buffers. */ |
| 485 | #define MAX_BUFFER_LOCAL_VARS 30 | 485 | #define MAX_PER_BUFFER_VARS 50 |
| 486 | char local_flags[MAX_BUFFER_LOCAL_VARS]; | 486 | char local_flags[MAX_PER_BUFFER_VARS]; |
| 487 | 487 | ||
| 488 | /* Set to the modtime of the visited file when read or written. | 488 | /* Set to the modtime of the visited file when read or written. |
| 489 | -1 means visited file was nonexistent. | 489 | -1 means visited file was nonexistent. |
| @@ -863,12 +863,12 @@ extern char *r_re_alloc P_ ((char **, unsigned long)); | |||
| 863 | 863 | ||
| 864 | /* Number of per-buffer variables used. */ | 864 | /* Number of per-buffer variables used. */ |
| 865 | 865 | ||
| 866 | extern int max_buffer_local_idx; | 866 | extern int last_per_buffer_idx; |
| 867 | 867 | ||
| 868 | /* Return the offset in bytes of member VAR of struct buffer | 868 | /* Return the offset in bytes of member VAR of struct buffer |
| 869 | from the start of a buffer structure. */ | 869 | from the start of a buffer structure. */ |
| 870 | 870 | ||
| 871 | #define BUFFER_LOCAL_VAR_OFFSET(VAR) \ | 871 | #define PER_BUFFER_VAR_OFFSET(VAR) \ |
| 872 | ((char *) &buffer_local_flags.VAR - (char *) &buffer_local_flags) | 872 | ((char *) &buffer_local_flags.VAR - (char *) &buffer_local_flags) |
| 873 | 873 | ||
| 874 | /* Return the index of buffer-local variable VAR. Each per-buffer | 874 | /* Return the index of buffer-local variable VAR. Each per-buffer |
| @@ -877,23 +877,23 @@ extern int max_buffer_local_idx; | |||
| 877 | 0, this is a bug and means that the slot of VAR in | 877 | 0, this is a bug and means that the slot of VAR in |
| 878 | buffer_local_flags wasn't intiialized. */ | 878 | buffer_local_flags wasn't intiialized. */ |
| 879 | 879 | ||
| 880 | #define BUFFER_LOCAL_VAR_IDX(VAR) \ | 880 | #define PER_BUFFER_VAR_IDX(VAR) \ |
| 881 | BUFFER_LOCAL_IDX (BUFFER_LOCAL_VAR_OFFSET (VAR)) | 881 | PER_BUFFER_IDX (PER_BUFFER_VAR_OFFSET (VAR)) |
| 882 | 882 | ||
| 883 | /* Value is non-zero if the variable with index IDX has a local value | 883 | /* Value is non-zero if the variable with index IDX has a local value |
| 884 | in buffer B. */ | 884 | in buffer B. */ |
| 885 | 885 | ||
| 886 | #define BUFFER_HAS_LOCAL_VALUE_P(B, IDX) \ | 886 | #define PER_BUFFER_VALUE_P(B, IDX) \ |
| 887 | (((IDX) < 0 || IDX >= max_buffer_local_idx) \ | 887 | (((IDX) < 0 || IDX >= last_per_buffer_idx) \ |
| 888 | ? (abort (), 0) \ | 888 | ? (abort (), 0) \ |
| 889 | : ((B)->local_flags[IDX] != 0)) | 889 | : ((B)->local_flags[IDX] != 0)) |
| 890 | 890 | ||
| 891 | /* Set whether per-buffer variable with index IDX has a buffer-local | 891 | /* Set whether per-buffer variable with index IDX has a buffer-local |
| 892 | value in buffer B. VAL zero means it hasn't. */ | 892 | value in buffer B. VAL zero means it hasn't. */ |
| 893 | 893 | ||
| 894 | #define SET_BUFFER_HAS_LOCAL_VALUE_P(B, IDX, VAL) \ | 894 | #define SET_PER_BUFFER_VALUE_P(B, IDX, VAL) \ |
| 895 | do { \ | 895 | do { \ |
| 896 | if ((IDX) < 0 || (IDX) >= max_buffer_local_idx) \ | 896 | if ((IDX) < 0 || (IDX) >= last_per_buffer_idx) \ |
| 897 | abort (); \ | 897 | abort (); \ |
| 898 | (B)->local_flags[IDX] = (VAL); \ | 898 | (B)->local_flags[IDX] = (VAL); \ |
| 899 | } while (0) | 899 | } while (0) |
| @@ -901,29 +901,29 @@ extern int max_buffer_local_idx; | |||
| 901 | /* Return the index of the per-buffer variable at offset OFFSET in the | 901 | /* Return the index of the per-buffer variable at offset OFFSET in the |
| 902 | buffer structure. */ | 902 | buffer structure. */ |
| 903 | 903 | ||
| 904 | #define BUFFER_LOCAL_IDX(OFFSET) \ | 904 | #define PER_BUFFER_IDX(OFFSET) \ |
| 905 | XINT (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_flags)) | 905 | XINT (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_flags)) |
| 906 | 906 | ||
| 907 | /* Return the default value of the per-buffer variable at offset | 907 | /* Return the default value of the per-buffer variable at offset |
| 908 | OFFSET in the buffer structure. */ | 908 | OFFSET in the buffer structure. */ |
| 909 | 909 | ||
| 910 | #define BUFFER_LOCAL_DEFAULT_VALUE(OFFSET) \ | 910 | #define PER_BUFFER_DEFAULT(OFFSET) \ |
| 911 | (*(Lisp_Object *)((OFFSET) + (char *) &buffer_defaults)) | 911 | (*(Lisp_Object *)((OFFSET) + (char *) &buffer_defaults)) |
| 912 | 912 | ||
| 913 | /* Return the buffer-local value of the per-buffer variable at offset | 913 | /* Return the buffer-local value of the per-buffer variable at offset |
| 914 | OFFSET in the buffer structure. */ | 914 | OFFSET in the buffer structure. */ |
| 915 | 915 | ||
| 916 | #define BUFFER_LOCAL_VALUE(BUFFER, OFFSET) \ | 916 | #define PER_BUFFER_VALUE(BUFFER, OFFSET) \ |
| 917 | (*(Lisp_Object *)((OFFSET) + (char *) (BUFFER))) | 917 | (*(Lisp_Object *)((OFFSET) + (char *) (BUFFER))) |
| 918 | 918 | ||
| 919 | /* Return the symbol of the per-buffer variable at offset OFFSET in | 919 | /* Return the symbol of the per-buffer variable at offset OFFSET in |
| 920 | the buffer structure. */ | 920 | the buffer structure. */ |
| 921 | 921 | ||
| 922 | #define BUFFER_LOCAL_SYMBOL(OFFSET) \ | 922 | #define PER_BUFFER_SYMBOL(OFFSET) \ |
| 923 | (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_symbols)) | 923 | (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_symbols)) |
| 924 | 924 | ||
| 925 | /* Return the type of the per-buffer variable at offset OFFSET in the | 925 | /* Return the type of the per-buffer variable at offset OFFSET in the |
| 926 | buffer structure. */ | 926 | buffer structure. */ |
| 927 | 927 | ||
| 928 | #define BUFFER_LOCAL_TYPE(OFFSET) \ | 928 | #define PER_BUFFER_TYPE(OFFSET) \ |
| 929 | (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_types)) | 929 | (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_types)) |