]> git.eshelyaron.com Git - emacs.git/commitdiff
Use BASE_EQ instead of EQ for some uninterned symbols
authorMattias Engdegård <mattiase@acm.org>
Fri, 10 Nov 2023 15:57:15 +0000 (16:57 +0100)
committerMattias Engdegård <mattiase@acm.org>
Fri, 10 Nov 2023 15:57:15 +0000 (16:57 +0100)
* 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.

src/editfns.c
src/eval.c
src/fileio.c
src/fns.c
src/keyboard.c

index 02fca3f5714b5f31c37de84f0e1fc35fed86ec9a..1ea7931a3a7916bdd7f31db9b6139bf63f0cc324 100644 (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.  */
index f5397e9fb72737cddeb4c3a77aa244b67a1860b8..d66bcdae6ce855acc78391fd47362b906ea31bc5 100644 (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))
index 8919e08e1fd78f44dea2ec0449534b6d26034343..51937e6d76557335cdb8e5363ebe46ce2a164dcb 100644 (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);
index a3f89637dfd5d5995fa2a2cc2242f4f605b4e57c..84aa86d9eb6923a6f30ab95b525af2cbdbd1b203 100644 (file)
--- 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;
index 13cb7835dff4bd5ba7447095982fc4e3e2400561..81605e75ba27236c5142a5b0610ca625f24a397d 100644 (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