1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-11 09:20:51 +00:00

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.
This commit is contained in:
Mattias Engdegård 2023-11-10 16:57:15 +01:00
parent dfcc9a0f4d
commit 7f3ee93e0c
5 changed files with 7 additions and 7 deletions

View File

@ -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. */

View File

@ -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))

View File

@ -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);

View File

@ -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;

View File

@ -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