diff options
| author | Tom Tromey | 2012-09-04 10:10:06 -0600 |
|---|---|---|
| committer | Tom Tromey | 2012-09-04 10:10:06 -0600 |
| commit | bf69f522a9e135f9aa483cedd53e71e915f2bf75 (patch) | |
| tree | 3f73c47fb863ef87f420de1d30858da821072bd9 /src/data.c | |
| parent | 303324a9232dbc89369faceb6b3530740d0fc1bd (diff) | |
| parent | 6ec9a5a7b5efb129807f567709ca858211ed7840 (diff) | |
| download | emacs-bf69f522a9e135f9aa483cedd53e71e915f2bf75.tar.gz emacs-bf69f522a9e135f9aa483cedd53e71e915f2bf75.zip | |
merge from trunk
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/src/data.c b/src/data.c index ac6c7af9d3c..a93cd169bf5 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -83,8 +83,8 @@ Lisp_Object Qoverflow_error, Qunderflow_error; | |||
| 83 | Lisp_Object Qfloatp; | 83 | Lisp_Object Qfloatp; |
| 84 | Lisp_Object Qnumberp, Qnumber_or_marker_p; | 84 | Lisp_Object Qnumberp, Qnumber_or_marker_p; |
| 85 | 85 | ||
| 86 | Lisp_Object Qinteger, Qinterval, Qfloat, Qvector; | 86 | Lisp_Object Qinteger, Qsymbol; |
| 87 | Lisp_Object Qsymbol, Qstring, Qcons, Qmisc; | 87 | static Lisp_Object Qcons, Qfloat, Qmisc, Qstring, Qvector; |
| 88 | Lisp_Object Qwindow; | 88 | Lisp_Object Qwindow; |
| 89 | static Lisp_Object Qoverlay, Qwindow_configuration; | 89 | static Lisp_Object Qoverlay, Qwindow_configuration; |
| 90 | static Lisp_Object Qprocess, Qmarker; | 90 | static Lisp_Object Qprocess, Qmarker; |
| @@ -1117,10 +1117,10 @@ DEFUN ("set", Fset, Sset, 2, 2, 0, | |||
| 1117 | return newval; | 1117 | return newval; |
| 1118 | } | 1118 | } |
| 1119 | 1119 | ||
| 1120 | /* Return 1 if SYMBOL currently has a let-binding | 1120 | /* Return true if SYMBOL currently has a let-binding |
| 1121 | which was made in the buffer that is now current. */ | 1121 | which was made in the buffer that is now current. */ |
| 1122 | 1122 | ||
| 1123 | static int | 1123 | static bool |
| 1124 | let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol) | 1124 | let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol) |
| 1125 | { | 1125 | { |
| 1126 | struct specbinding *p; | 1126 | struct specbinding *p; |
| @@ -1139,7 +1139,7 @@ let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol) | |||
| 1139 | return 0; | 1139 | return 0; |
| 1140 | } | 1140 | } |
| 1141 | 1141 | ||
| 1142 | static int | 1142 | static bool |
| 1143 | let_shadows_global_binding_p (Lisp_Object symbol) | 1143 | let_shadows_global_binding_p (Lisp_Object symbol) |
| 1144 | { | 1144 | { |
| 1145 | struct specbinding *p; | 1145 | struct specbinding *p; |
| @@ -1155,14 +1155,15 @@ let_shadows_global_binding_p (Lisp_Object symbol) | |||
| 1155 | If buffer/frame-locality is an issue, WHERE specifies which context to use. | 1155 | If buffer/frame-locality is an issue, WHERE specifies which context to use. |
| 1156 | (nil stands for the current buffer/frame). | 1156 | (nil stands for the current buffer/frame). |
| 1157 | 1157 | ||
| 1158 | If BINDFLAG is zero, then if this symbol is supposed to become | 1158 | If BINDFLAG is false, then if this symbol is supposed to become |
| 1159 | local in every buffer where it is set, then we make it local. | 1159 | local in every buffer where it is set, then we make it local. |
| 1160 | If BINDFLAG is nonzero, we don't do that. */ | 1160 | If BINDFLAG is true, we don't do that. */ |
| 1161 | 1161 | ||
| 1162 | void | 1162 | void |
| 1163 | set_internal (register Lisp_Object symbol, register Lisp_Object newval, register Lisp_Object where, int bindflag) | 1163 | set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where, |
| 1164 | bool bindflag) | ||
| 1164 | { | 1165 | { |
| 1165 | int voide = EQ (newval, Qunbound); | 1166 | bool voide = EQ (newval, Qunbound); |
| 1166 | struct Lisp_Symbol *sym; | 1167 | struct Lisp_Symbol *sym; |
| 1167 | Lisp_Object tem1; | 1168 | Lisp_Object tem1; |
| 1168 | 1169 | ||
| @@ -1501,7 +1502,8 @@ union Lisp_Val_Fwd | |||
| 1501 | }; | 1502 | }; |
| 1502 | 1503 | ||
| 1503 | static struct Lisp_Buffer_Local_Value * | 1504 | static struct Lisp_Buffer_Local_Value * |
| 1504 | make_blv (struct Lisp_Symbol *sym, int forwarded, union Lisp_Val_Fwd valcontents) | 1505 | make_blv (struct Lisp_Symbol *sym, bool forwarded, |
| 1506 | union Lisp_Val_Fwd valcontents) | ||
| 1505 | { | 1507 | { |
| 1506 | struct Lisp_Buffer_Local_Value *blv = xmalloc (sizeof *blv); | 1508 | struct Lisp_Buffer_Local_Value *blv = xmalloc (sizeof *blv); |
| 1507 | Lisp_Object symbol; | 1509 | Lisp_Object symbol; |
| @@ -1545,7 +1547,7 @@ The function `default-value' gets the default value and `set-default' sets it. | |||
| 1545 | struct Lisp_Symbol *sym; | 1547 | struct Lisp_Symbol *sym; |
| 1546 | struct Lisp_Buffer_Local_Value *blv = NULL; | 1548 | struct Lisp_Buffer_Local_Value *blv = NULL; |
| 1547 | union Lisp_Val_Fwd valcontents IF_LINT (= {LISP_INITIALLY_ZERO}); | 1549 | union Lisp_Val_Fwd valcontents IF_LINT (= {LISP_INITIALLY_ZERO}); |
| 1548 | int forwarded IF_LINT (= 0); | 1550 | bool forwarded IF_LINT (= 0); |
| 1549 | 1551 | ||
| 1550 | CHECK_SYMBOL (variable); | 1552 | CHECK_SYMBOL (variable); |
| 1551 | sym = XSYMBOL (variable); | 1553 | sym = XSYMBOL (variable); |
| @@ -1617,10 +1619,10 @@ See also `make-variable-buffer-local'. | |||
| 1617 | 1619 | ||
| 1618 | Do not use `make-local-variable' to make a hook variable buffer-local. | 1620 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 1619 | Instead, use `add-hook' and specify t for the LOCAL argument. */) | 1621 | Instead, use `add-hook' and specify t for the LOCAL argument. */) |
| 1620 | (register Lisp_Object variable) | 1622 | (Lisp_Object variable) |
| 1621 | { | 1623 | { |
| 1622 | register Lisp_Object tem; | 1624 | Lisp_Object tem; |
| 1623 | int forwarded IF_LINT (= 0); | 1625 | bool forwarded IF_LINT (= 0); |
| 1624 | union Lisp_Val_Fwd valcontents IF_LINT (= {LISP_INITIALLY_ZERO}); | 1626 | union Lisp_Val_Fwd valcontents IF_LINT (= {LISP_INITIALLY_ZERO}); |
| 1625 | struct Lisp_Symbol *sym; | 1627 | struct Lisp_Symbol *sym; |
| 1626 | struct Lisp_Buffer_Local_Value *blv = NULL; | 1628 | struct Lisp_Buffer_Local_Value *blv = NULL; |
| @@ -1804,9 +1806,9 @@ is to set the VARIABLE frame parameter of that frame. See | |||
| 1804 | Note that since Emacs 23.1, variables cannot be both buffer-local and | 1806 | Note that since Emacs 23.1, variables cannot be both buffer-local and |
| 1805 | frame-local any more (buffer-local bindings used to take precedence over | 1807 | frame-local any more (buffer-local bindings used to take precedence over |
| 1806 | frame-local bindings). */) | 1808 | frame-local bindings). */) |
| 1807 | (register Lisp_Object variable) | 1809 | (Lisp_Object variable) |
| 1808 | { | 1810 | { |
| 1809 | int forwarded; | 1811 | bool forwarded; |
| 1810 | union Lisp_Val_Fwd valcontents; | 1812 | union Lisp_Val_Fwd valcontents; |
| 1811 | struct Lisp_Symbol *sym; | 1813 | struct Lisp_Symbol *sym; |
| 1812 | struct Lisp_Buffer_Local_Value *blv = NULL; | 1814 | struct Lisp_Buffer_Local_Value *blv = NULL; |
| @@ -2262,7 +2264,7 @@ static Lisp_Object | |||
| 2262 | arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) | 2264 | arithcompare (Lisp_Object num1, Lisp_Object num2, enum comparison comparison) |
| 2263 | { | 2265 | { |
| 2264 | double f1 = 0, f2 = 0; | 2266 | double f1 = 0, f2 = 0; |
| 2265 | int floatp = 0; | 2267 | bool floatp = 0; |
| 2266 | 2268 | ||
| 2267 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num1); | 2269 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num1); |
| 2268 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num2); | 2270 | CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num2); |
| @@ -2379,7 +2381,7 @@ DEFUN ("zerop", Fzerop, Szerop, 1, 1, 0, | |||
| 2379 | uintmax_t | 2381 | uintmax_t |
| 2380 | cons_to_unsigned (Lisp_Object c, uintmax_t max) | 2382 | cons_to_unsigned (Lisp_Object c, uintmax_t max) |
| 2381 | { | 2383 | { |
| 2382 | int valid = 0; | 2384 | bool valid = 0; |
| 2383 | uintmax_t val IF_LINT (= 0); | 2385 | uintmax_t val IF_LINT (= 0); |
| 2384 | if (INTEGERP (c)) | 2386 | if (INTEGERP (c)) |
| 2385 | { | 2387 | { |
| @@ -2432,7 +2434,7 @@ cons_to_unsigned (Lisp_Object c, uintmax_t max) | |||
| 2432 | intmax_t | 2434 | intmax_t |
| 2433 | cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max) | 2435 | cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max) |
| 2434 | { | 2436 | { |
| 2435 | int valid = 0; | 2437 | bool valid = 0; |
| 2436 | intmax_t val IF_LINT (= 0); | 2438 | intmax_t val IF_LINT (= 0); |
| 2437 | if (INTEGERP (c)) | 2439 | if (INTEGERP (c)) |
| 2438 | { | 2440 | { |
| @@ -2550,14 +2552,11 @@ static Lisp_Object float_arith_driver (double, ptrdiff_t, enum arithop, | |||
| 2550 | static Lisp_Object | 2552 | static Lisp_Object |
| 2551 | arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) | 2553 | arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args) |
| 2552 | { | 2554 | { |
| 2553 | register Lisp_Object val; | 2555 | Lisp_Object val; |
| 2554 | ptrdiff_t argnum; | 2556 | ptrdiff_t argnum, ok_args; |
| 2555 | register EMACS_INT accum = 0; | 2557 | EMACS_INT accum = 0; |
| 2556 | register EMACS_INT next; | 2558 | EMACS_INT next, ok_accum; |
| 2557 | 2559 | bool overflow = 0; | |
| 2558 | int overflow = 0; | ||
| 2559 | ptrdiff_t ok_args; | ||
| 2560 | EMACS_INT ok_accum; | ||
| 2561 | 2560 | ||
| 2562 | switch (code) | 2561 | switch (code) |
| 2563 | { | 2562 | { |
| @@ -3130,8 +3129,6 @@ syms_of_data (void) | |||
| 3130 | DEFSYM (Qthread, "thread"); | 3129 | DEFSYM (Qthread, "thread"); |
| 3131 | DEFSYM (Qmutex, "mutex"); | 3130 | DEFSYM (Qmutex, "mutex"); |
| 3132 | DEFSYM (Qcondition_variable, "condition-variable"); | 3131 | DEFSYM (Qcondition_variable, "condition-variable"); |
| 3133 | /* Used by Fgarbage_collect. */ | ||
| 3134 | DEFSYM (Qinterval, "interval"); | ||
| 3135 | DEFSYM (Qmisc, "misc"); | 3132 | DEFSYM (Qmisc, "misc"); |
| 3136 | 3133 | ||
| 3137 | DEFSYM (Qdefun, "defun"); | 3134 | DEFSYM (Qdefun, "defun"); |