diff options
| author | Mattias EngdegÄrd | 2024-08-15 16:00:47 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2024-08-15 16:02:17 +0200 |
| commit | 8db72a8d4b77ccdbb68f7361a52d7f2ebe78b656 (patch) | |
| tree | 31462f8884d9a2cb5dcb253e82421ad1acc71d04 /src | |
| parent | 03a791556af3b3683921799cce6df2f5ec81c1e7 (diff) | |
| download | emacs-8db72a8d4b77ccdbb68f7361a52d7f2ebe78b656.tar.gz emacs-8db72a8d4b77ccdbb68f7361a52d7f2ebe78b656.zip | |
Replace some EQ with BASE_EQ
* src/eval.c (FletX, Flet, funcall_lambda)
(let_shadows_buffer_binding_p):
* src/data.c (set_blv_found, set_internal, default_value)
(set_default_internal, Flocal_variable_p):
* src/buffer.c (Fkill_buffer):
(mouse_face_overlay_overlaps, compare_overlays)
(report_overlay_modification):
BASE_EQ is safe because we don't actually compare symbols here.
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.c | 8 | ||||
| -rw-r--r-- | src/data.c | 12 | ||||
| -rw-r--r-- | src/eval.c | 8 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/buffer.c b/src/buffer.c index 6ec40aff646..78f1d977221 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -2036,7 +2036,7 @@ cleaning up all windows currently displaying the buffer to be killed. */) | |||
| 2036 | /* If the buffer now current is shown in the minibuffer and our buffer | 2036 | /* If the buffer now current is shown in the minibuffer and our buffer |
| 2037 | is the sole other buffer give up. */ | 2037 | is the sole other buffer give up. */ |
| 2038 | XSETBUFFER (tem, current_buffer); | 2038 | XSETBUFFER (tem, current_buffer); |
| 2039 | if (EQ (tem, XWINDOW (minibuf_window)->contents) | 2039 | if (BASE_EQ (tem, XWINDOW (minibuf_window)->contents) |
| 2040 | && BASE_EQ (buffer, Fother_buffer (buffer, Qnil, Qnil))) | 2040 | && BASE_EQ (buffer, Fother_buffer (buffer, Qnil, Qnil))) |
| 2041 | return Qnil; | 2041 | return Qnil; |
| 2042 | 2042 | ||
| @@ -3175,7 +3175,7 @@ mouse_face_overlay_overlaps (Lisp_Object overlay) | |||
| 3175 | { | 3175 | { |
| 3176 | if (node->begin < end && node->end > start | 3176 | if (node->begin < end && node->end > start |
| 3177 | && node->begin < node->end | 3177 | && node->begin < node->end |
| 3178 | && !EQ (node->data, overlay) | 3178 | && !BASE_EQ (node->data, overlay) |
| 3179 | && (tem = Foverlay_get (overlay, Qmouse_face), | 3179 | && (tem = Foverlay_get (overlay, Qmouse_face), |
| 3180 | !NILP (tem))) | 3180 | !NILP (tem))) |
| 3181 | return true; | 3181 | return true; |
| @@ -3238,7 +3238,7 @@ compare_overlays (const void *v1, const void *v2) | |||
| 3238 | return s2->end < s1->end ? -1 : 1; | 3238 | return s2->end < s1->end ? -1 : 1; |
| 3239 | else if (s1->spriority != s2->spriority) | 3239 | else if (s1->spriority != s2->spriority) |
| 3240 | return (s1->spriority < s2->spriority ? -1 : 1); | 3240 | return (s1->spriority < s2->spriority ? -1 : 1); |
| 3241 | else if (EQ (s1->overlay, s2->overlay)) | 3241 | else if (BASE_EQ (s1->overlay, s2->overlay)) |
| 3242 | return 0; | 3242 | return 0; |
| 3243 | else | 3243 | else |
| 3244 | /* Avoid the non-determinism of qsort by choosing an arbitrary ordering | 3244 | /* Avoid the non-determinism of qsort by choosing an arbitrary ordering |
| @@ -4090,7 +4090,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after, | |||
| 4090 | Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) | 4090 | Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3) |
| 4091 | { | 4091 | { |
| 4092 | /* True if this change is an insertion. */ | 4092 | /* True if this change is an insertion. */ |
| 4093 | bool insertion = (after ? XFIXNAT (arg3) == 0 : EQ (start, end)); | 4093 | bool insertion = (after ? XFIXNAT (arg3) == 0 : BASE_EQ (start, end)); |
| 4094 | 4094 | ||
| 4095 | /* We used to run the functions as soon as we found them and only register | 4095 | /* We used to run the functions as soon as we found them and only register |
| 4096 | them in last_overlay_modification_hooks for the purpose of the `after' | 4096 | them in last_overlay_modification_hooks for the purpose of the `after' |
diff --git a/src/data.c b/src/data.c index d947d200870..6fa543c97cf 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -82,7 +82,7 @@ XOBJFWD (lispfwd a) | |||
| 82 | static void | 82 | static void |
| 83 | set_blv_found (struct Lisp_Buffer_Local_Value *blv, int found) | 83 | set_blv_found (struct Lisp_Buffer_Local_Value *blv, int found) |
| 84 | { | 84 | { |
| 85 | eassert (found == !EQ (blv->defcell, blv->valcell)); | 85 | eassert (found == !BASE_EQ (blv->defcell, blv->valcell)); |
| 86 | blv->found = found; | 86 | blv->found = found; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| @@ -1697,9 +1697,9 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where, | |||
| 1697 | loaded, or if it's a Lisp_Buffer_Local_Value and | 1697 | loaded, or if it's a Lisp_Buffer_Local_Value and |
| 1698 | the default binding is loaded, the loaded binding may be the | 1698 | the default binding is loaded, the loaded binding may be the |
| 1699 | wrong one. */ | 1699 | wrong one. */ |
| 1700 | if (!EQ (blv->where, where) | 1700 | if (!BASE_EQ (blv->where, where) |
| 1701 | /* Also unload a global binding (if the var is local_if_set). */ | 1701 | /* Also unload a global binding (if the var is local_if_set). */ |
| 1702 | || (EQ (blv->valcell, blv->defcell))) | 1702 | || (BASE_EQ (blv->valcell, blv->defcell))) |
| 1703 | { | 1703 | { |
| 1704 | /* The currently loaded binding is not necessarily valid. | 1704 | /* The currently loaded binding is not necessarily valid. |
| 1705 | We need to unload it, and choose a new binding. */ | 1705 | We need to unload it, and choose a new binding. */ |
| @@ -1940,7 +1940,7 @@ default_value (Lisp_Object symbol) | |||
| 1940 | But the `realvalue' slot may be more up to date, since | 1940 | But the `realvalue' slot may be more up to date, since |
| 1941 | ordinary setq stores just that slot. So use that. */ | 1941 | ordinary setq stores just that slot. So use that. */ |
| 1942 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym); | 1942 | struct Lisp_Buffer_Local_Value *blv = SYMBOL_BLV (sym); |
| 1943 | if (blv->fwd.fwdptr && EQ (blv->valcell, blv->defcell)) | 1943 | if (blv->fwd.fwdptr && BASE_EQ (blv->valcell, blv->defcell)) |
| 1944 | return do_symval_forwarding (blv->fwd); | 1944 | return do_symval_forwarding (blv->fwd); |
| 1945 | else | 1945 | else |
| 1946 | return XCDR (blv->defcell); | 1946 | return XCDR (blv->defcell); |
| @@ -2035,7 +2035,7 @@ set_default_internal (Lisp_Object symbol, Lisp_Object value, | |||
| 2035 | XSETCDR (blv->defcell, value); | 2035 | XSETCDR (blv->defcell, value); |
| 2036 | 2036 | ||
| 2037 | /* If the default binding is now loaded, set the REALVALUE slot too. */ | 2037 | /* If the default binding is now loaded, set the REALVALUE slot too. */ |
| 2038 | if (blv->fwd.fwdptr && EQ (blv->defcell, blv->valcell)) | 2038 | if (blv->fwd.fwdptr && BASE_EQ (blv->defcell, blv->valcell)) |
| 2039 | store_symval_forwarding (blv->fwd, value, NULL); | 2039 | store_symval_forwarding (blv->fwd, value, NULL); |
| 2040 | return; | 2040 | return; |
| 2041 | } | 2041 | } |
| @@ -2401,7 +2401,7 @@ Also see `buffer-local-boundp'.*/) | |||
| 2401 | XSETBUFFER (tmp, buf); | 2401 | XSETBUFFER (tmp, buf); |
| 2402 | XSETSYMBOL (variable, sym); /* Update in case of aliasing. */ | 2402 | XSETSYMBOL (variable, sym); /* Update in case of aliasing. */ |
| 2403 | 2403 | ||
| 2404 | if (EQ (blv->where, tmp)) /* The binding is already loaded. */ | 2404 | if (BASE_EQ (blv->where, tmp)) /* The binding is already loaded. */ |
| 2405 | return blv_found (blv) ? Qt : Qnil; | 2405 | return blv_found (blv) ? Qt : Qnil; |
| 2406 | else | 2406 | else |
| 2407 | return NILP (assq_no_quit (variable, BVAR (buf, local_var_alist))) | 2407 | return NILP (assq_no_quit (variable, BVAR (buf, local_var_alist))) |
diff --git a/src/eval.c b/src/eval.c index 16ece744f42..b4103acd28f 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1026,7 +1026,7 @@ usage: (let* VARLIST BODY...) */) | |||
| 1026 | { | 1026 | { |
| 1027 | Lisp_Object newenv | 1027 | Lisp_Object newenv |
| 1028 | = Fcons (Fcons (var, val), Vinternal_interpreter_environment); | 1028 | = Fcons (Fcons (var, val), Vinternal_interpreter_environment); |
| 1029 | if (EQ (Vinternal_interpreter_environment, lexenv)) | 1029 | if (BASE_EQ (Vinternal_interpreter_environment, lexenv)) |
| 1030 | /* Save the old lexical environment on the specpdl stack, | 1030 | /* Save the old lexical environment on the specpdl stack, |
| 1031 | but only for the first lexical binding, since we'll never | 1031 | but only for the first lexical binding, since we'll never |
| 1032 | need to revert to one of the intermediate ones. */ | 1032 | need to revert to one of the intermediate ones. */ |
| @@ -1102,7 +1102,7 @@ usage: (let VARLIST BODY...) */) | |||
| 1102 | specbind (var, tem); | 1102 | specbind (var, tem); |
| 1103 | } | 1103 | } |
| 1104 | 1104 | ||
| 1105 | if (!EQ (lexenv, Vinternal_interpreter_environment)) | 1105 | if (!BASE_EQ (lexenv, Vinternal_interpreter_environment)) |
| 1106 | /* Instantiate a new lexical environment. */ | 1106 | /* Instantiate a new lexical environment. */ |
| 1107 | specbind (Qinternal_interpreter_environment, lexenv); | 1107 | specbind (Qinternal_interpreter_environment, lexenv); |
| 1108 | 1108 | ||
| @@ -3320,7 +3320,7 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, Lisp_Object *arg_vector) | |||
| 3320 | else if (i < nargs) | 3320 | else if (i < nargs) |
| 3321 | xsignal2 (Qwrong_number_of_arguments, fun, make_fixnum (nargs)); | 3321 | xsignal2 (Qwrong_number_of_arguments, fun, make_fixnum (nargs)); |
| 3322 | 3322 | ||
| 3323 | if (!EQ (lexenv, Vinternal_interpreter_environment)) | 3323 | if (!BASE_EQ (lexenv, Vinternal_interpreter_environment)) |
| 3324 | /* Instantiate a new lexical environment. */ | 3324 | /* Instantiate a new lexical environment. */ |
| 3325 | specbind (Qinternal_interpreter_environment, lexenv); | 3325 | specbind (Qinternal_interpreter_environment, lexenv); |
| 3326 | 3326 | ||
| @@ -3471,7 +3471,7 @@ let_shadows_buffer_binding_p (struct Lisp_Symbol *symbol) | |||
| 3471 | eassert (let_bound_symbol->u.s.redirect != SYMBOL_VARALIAS); | 3471 | eassert (let_bound_symbol->u.s.redirect != SYMBOL_VARALIAS); |
| 3472 | if (symbol == let_bound_symbol | 3472 | if (symbol == let_bound_symbol |
| 3473 | && p->kind != SPECPDL_LET_LOCAL /* bug#62419 */ | 3473 | && p->kind != SPECPDL_LET_LOCAL /* bug#62419 */ |
| 3474 | && EQ (specpdl_where (p), buf)) | 3474 | && BASE_EQ (specpdl_where (p), buf)) |
| 3475 | return 1; | 3475 | return 1; |
| 3476 | } | 3476 | } |
| 3477 | 3477 | ||