diff options
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/src/data.c b/src/data.c index 6039743b1d5..e5c485f5322 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -807,7 +807,10 @@ variable chain of symbols. */) | |||
| 807 | (Lisp_Object object) | 807 | (Lisp_Object object) |
| 808 | { | 808 | { |
| 809 | if (SYMBOLP (object)) | 809 | if (SYMBOLP (object)) |
| 810 | XSETSYMBOL (object, indirect_variable (XSYMBOL (object))); | 810 | { |
| 811 | struct Lisp_Symbol *sym = indirect_variable (XSYMBOL (object)); | ||
| 812 | XSETSYMBOL (object, sym); | ||
| 813 | } | ||
| 811 | return object; | 814 | return object; |
| 812 | } | 815 | } |
| 813 | 816 | ||
| @@ -817,9 +820,6 @@ variable chain of symbols. */) | |||
| 817 | This does not handle buffer-local variables; use | 820 | This does not handle buffer-local variables; use |
| 818 | swap_in_symval_forwarding for that. */ | 821 | swap_in_symval_forwarding for that. */ |
| 819 | 822 | ||
| 820 | #define do_blv_forwarding(blv) \ | ||
| 821 | ((blv)->forwarded ? do_symval_forwarding (BLV_FWD (blv)) : BLV_VALUE (blv)) | ||
| 822 | |||
| 823 | Lisp_Object | 823 | Lisp_Object |
| 824 | do_symval_forwarding (register union Lisp_Fwd *valcontents) | 824 | do_symval_forwarding (register union Lisp_Fwd *valcontents) |
| 825 | { | 825 | { |
| @@ -866,14 +866,6 @@ do_symval_forwarding (register union Lisp_Fwd *valcontents) | |||
| 866 | BUF non-zero means set the value in buffer BUF instead of the | 866 | BUF non-zero means set the value in buffer BUF instead of the |
| 867 | current buffer. This only plays a role for per-buffer variables. */ | 867 | current buffer. This only plays a role for per-buffer variables. */ |
| 868 | 868 | ||
| 869 | #define store_blv_forwarding(blv, newval, buf) \ | ||
| 870 | do { \ | ||
| 871 | if ((blv)->forwarded) \ | ||
| 872 | store_symval_forwarding (BLV_FWD (blv), (newval), (buf)); \ | ||
| 873 | else \ | ||
| 874 | SET_BLV_VALUE (blv, newval); \ | ||
| 875 | } while (0) | ||
| 876 | |||
| 877 | static void | 869 | static void |
| 878 | store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newval, struct buffer *buf) | 870 | store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newval, struct buffer *buf) |
| 879 | { | 871 | { |
| @@ -909,12 +901,12 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva | |||
| 909 | 901 | ||
| 910 | for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) | 902 | for (tail = Vbuffer_alist; CONSP (tail); tail = XCDR (tail)) |
| 911 | { | 903 | { |
| 912 | Lisp_Object buf; | 904 | Lisp_Object lbuf; |
| 913 | struct buffer *b; | 905 | struct buffer *b; |
| 914 | 906 | ||
| 915 | buf = Fcdr (XCAR (tail)); | 907 | lbuf = Fcdr (XCAR (tail)); |
| 916 | if (!BUFFERP (buf)) continue; | 908 | if (!BUFFERP (lbuf)) continue; |
| 917 | b = XBUFFER (buf); | 909 | b = XBUFFER (lbuf); |
| 918 | 910 | ||
| 919 | if (! PER_BUFFER_VALUE_P (b, idx)) | 911 | if (! PER_BUFFER_VALUE_P (b, idx)) |
| 920 | PER_BUFFER_VALUE (b, offset) = newval; | 912 | PER_BUFFER_VALUE (b, offset) = newval; |
| @@ -1271,7 +1263,7 @@ set_internal (register Lisp_Object symbol, register Lisp_Object newval, register | |||
| 1271 | /* Return the default value of SYMBOL, but don't check for voidness. | 1263 | /* Return the default value of SYMBOL, but don't check for voidness. |
| 1272 | Return Qunbound if it is void. */ | 1264 | Return Qunbound if it is void. */ |
| 1273 | 1265 | ||
| 1274 | Lisp_Object | 1266 | static Lisp_Object |
| 1275 | default_value (Lisp_Object symbol) | 1267 | default_value (Lisp_Object symbol) |
| 1276 | { | 1268 | { |
| 1277 | struct Lisp_Symbol *sym; | 1269 | struct Lisp_Symbol *sym; |
| @@ -1505,8 +1497,8 @@ The function `default-value' gets the default value and `set-default' sets it. | |||
| 1505 | { | 1497 | { |
| 1506 | struct Lisp_Symbol *sym; | 1498 | struct Lisp_Symbol *sym; |
| 1507 | struct Lisp_Buffer_Local_Value *blv = NULL; | 1499 | struct Lisp_Buffer_Local_Value *blv = NULL; |
| 1508 | union Lisp_Val_Fwd valcontents; | 1500 | union Lisp_Val_Fwd valcontents IF_LINT (= {0}); |
| 1509 | int forwarded; | 1501 | int forwarded IF_LINT (= 0); |
| 1510 | 1502 | ||
| 1511 | CHECK_SYMBOL (variable); | 1503 | CHECK_SYMBOL (variable); |
| 1512 | sym = XSYMBOL (variable); | 1504 | sym = XSYMBOL (variable); |
| @@ -1581,8 +1573,8 @@ Instead, use `add-hook' and specify t for the LOCAL argument. */) | |||
| 1581 | (register Lisp_Object variable) | 1573 | (register Lisp_Object variable) |
| 1582 | { | 1574 | { |
| 1583 | register Lisp_Object tem; | 1575 | register Lisp_Object tem; |
| 1584 | int forwarded; | 1576 | int forwarded IF_LINT (= 0); |
| 1585 | union Lisp_Val_Fwd valcontents; | 1577 | union Lisp_Val_Fwd valcontents IF_LINT (= {0}); |
| 1586 | struct Lisp_Symbol *sym; | 1578 | struct Lisp_Symbol *sym; |
| 1587 | struct Lisp_Buffer_Local_Value *blv = NULL; | 1579 | struct Lisp_Buffer_Local_Value *blv = NULL; |
| 1588 | 1580 | ||
| @@ -2218,7 +2210,7 @@ bool-vector. IDX starts at 0. */) | |||
| 2218 | 2210 | ||
| 2219 | enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal }; | 2211 | enum comparison { equal, notequal, less, grtr, less_or_equal, grtr_or_equal }; |
| 2220 | 2212 | ||
| 2221 | Lisp_Object | 2213 | static Lisp_Object |
| 2222 | arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) | 2214 | arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) |
| 2223 | { | 2215 | { |
| 2224 | double f1 = 0, f2 = 0; | 2216 | double f1 = 0, f2 = 0; |
| @@ -2486,7 +2478,7 @@ enum arithop | |||
| 2486 | 2478 | ||
| 2487 | static Lisp_Object float_arith_driver (double, int, enum arithop, | 2479 | static Lisp_Object float_arith_driver (double, int, enum arithop, |
| 2488 | int, Lisp_Object *); | 2480 | int, Lisp_Object *); |
| 2489 | Lisp_Object | 2481 | static Lisp_Object |
| 2490 | arith_driver (enum arithop code, int nargs, register Lisp_Object *args) | 2482 | arith_driver (enum arithop code, int nargs, register Lisp_Object *args) |
| 2491 | { | 2483 | { |
| 2492 | register Lisp_Object val; | 2484 | register Lisp_Object val; |
| @@ -3310,7 +3302,7 @@ syms_of_data (void) | |||
| 3310 | XSYMBOL (intern_c_string ("most-negative-fixnum"))->constant = 1; | 3302 | XSYMBOL (intern_c_string ("most-negative-fixnum"))->constant = 1; |
| 3311 | } | 3303 | } |
| 3312 | 3304 | ||
| 3313 | SIGTYPE | 3305 | static SIGTYPE |
| 3314 | arith_error (int signo) | 3306 | arith_error (int signo) |
| 3315 | { | 3307 | { |
| 3316 | sigsetmask (SIGEMPTYMASK); | 3308 | sigsetmask (SIGEMPTYMASK); |