From: Mattias EngdegÄrd Date: Fri, 10 Nov 2023 15:57:15 +0000 (+0100) Subject: Use BASE_EQ instead of EQ for some uninterned symbols X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7f3ee93e0ccb9ffd4fdb23ad13b0fbf4b1353779;p=emacs.git Use BASE_EQ instead of EQ for some uninterned symbols * src/editfns.c (labeled_restrictions_pop, Fwiden): * src/eval.c (lexbound_p, Fbacktrace__locals): * src/fileio.c (Finsert_file_contents): * src/fns.c (Fyes_or_no_p): * src/keyboard.c (command_loop_1): Use BASE_EQ for comparing with Qoutermost_restriction, Qinternal_interpreter_environment and Qunbound as uninterned symbols won't be EQ to a symbol-with-pos. --- diff --git a/src/editfns.c b/src/editfns.c index 02fca3f5714..1ea7931a3a7 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -2780,7 +2780,7 @@ labeled_restrictions_pop (Lisp_Object buf) Lisp_Object restrictions = assq_no_quit (buf, labeled_restrictions); if (NILP (restrictions)) return; - if (EQ (labeled_restrictions_peek_label (buf), Qoutermost_restriction)) + if (BASE_EQ (labeled_restrictions_peek_label (buf), Qoutermost_restriction)) labeled_restrictions_remove (buf); else XSETCDR (restrictions, list1 (XCDR (XCAR (XCDR (restrictions))))); @@ -2920,7 +2920,7 @@ To gain access to other portions of the buffer, use current_buffer are the bounds that were set by the user, no labeled restriction is in effect in current_buffer anymore: remove it from the labeled_restrictions alist. */ - if (EQ (label, Qoutermost_restriction)) + if (BASE_EQ (label, Qoutermost_restriction)) labeled_restrictions_pop (buf); } /* Changing the buffer bounds invalidates any recorded current column. */ diff --git a/src/eval.c b/src/eval.c index f5397e9fb72..d66bcdae6ce 100644 --- a/src/eval.c +++ b/src/eval.c @@ -689,7 +689,7 @@ lexbound_p (Lisp_Object symbol) { case SPECPDL_LET_DEFAULT: case SPECPDL_LET: - if (EQ (specpdl_symbol (pdl), Qinternal_interpreter_environment)) + if (BASE_EQ (specpdl_symbol (pdl), Qinternal_interpreter_environment)) { Lisp_Object env = specpdl_old_value (pdl); if (CONSP (env) && !NILP (Fassq (symbol, env))) @@ -4107,7 +4107,7 @@ NFRAMES and BASE specify the activation frame to use, as in `backtrace-frame'. { Lisp_Object sym = specpdl_symbol (tmp); Lisp_Object val = specpdl_old_value (tmp); - if (EQ (sym, Qinternal_interpreter_environment)) + if (BASE_EQ (sym, Qinternal_interpreter_environment)) { Lisp_Object env = val; for (; CONSP (env); env = XCDR (env)) diff --git a/src/fileio.c b/src/fileio.c index 8919e08e1fd..51937e6d765 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4778,7 +4778,7 @@ by calling `format-decode', which see. */) make_gap (total - GAP_SIZE + 1); if (beg_offset != 0 || (!NILP (replace) - && !EQ (replace, Qunbound))) + && !BASE_EQ (replace, Qunbound))) { if (emacs_fd_lseek (fd, beg_offset, SEEK_SET) < 0) report_file_error ("Setting file position", orig_filename); diff --git a/src/fns.c b/src/fns.c index a3f89637dfd..84aa86d9eb6 100644 --- a/src/fns.c +++ b/src/fns.c @@ -3239,7 +3239,7 @@ by a mouse, or by some window-system gesture, or via a menu. */) && (CONSP (last_nonmenu_event) || (NILP (last_nonmenu_event) && CONSP (last_input_event)) || (val = find_symbol_value (Qfrom__tty_menu_p), - (!NILP (val) && !EQ (val, Qunbound)))) + (!NILP (val) && !BASE_EQ (val, Qunbound)))) && use_dialog_box) { Lisp_Object pane, menu, obj; diff --git a/src/keyboard.c b/src/keyboard.c index 13cb7835dff..81605e75ba2 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1601,7 +1601,7 @@ command_loop_1 (void) if ((!NILP (Fwindow_system (Qnil)) || ((symval = find_symbol_value (Qtty_select_active_regions), - (!EQ (symval, Qunbound) && !NILP (symval))) + (!BASE_EQ (symval, Qunbound) && !NILP (symval))) && !NILP (Fterminal_parameter (Qnil, Qxterm__set_selection)))) /* Even if mark_active is non-nil, the actual buffer