emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master b9a910a701a 2/2: Use BASE_EQ instead of EQ in search.c


From: Mattias Engdegård
Subject: master b9a910a701a 2/2: Use BASE_EQ instead of EQ in search.c
Date: Fri, 21 Jul 2023 08:52:01 -0400 (EDT)

branch: master
commit b9a910a701a792825462a75332a9aec6824fe874
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    Use BASE_EQ instead of EQ in search.c
    
    * src/search.c (clear_regexp_cache, compile_pattern, Fmatch_data):
    Use BASE_EQ where appropriate.
---
 src/search.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/search.c b/src/search.c
index 122d6166637..3edfc0bc1a8 100644
--- a/src/search.c
+++ b/src/search.c
@@ -162,7 +162,7 @@ clear_regexp_cache (void)
     /* It's tempting to compare with the syntax-table we've actually changed,
        but it's not sufficient because char-table inheritance means that
        modifying one syntax-table can change others at the same time.  */
-    if (!searchbufs[i].busy && !EQ (searchbufs[i].syntax_table, Qt))
+    if (!searchbufs[i].busy && !BASE_EQ (searchbufs[i].syntax_table, Qt))
       searchbufs[i].regexp = Qnil;
 }
 
@@ -214,10 +214,11 @@ compile_pattern (Lisp_Object pattern, struct re_registers 
*regp,
           && !cp->busy
          && STRING_MULTIBYTE (cp->regexp) == STRING_MULTIBYTE (pattern)
          && !NILP (Fstring_equal (cp->regexp, pattern))
-         && EQ (cp->buf.translate, translate)
+         && BASE_EQ (cp->buf.translate, translate)
          && cp->posix == posix
-         && (EQ (cp->syntax_table, Qt)
-             || EQ (cp->syntax_table, BVAR (current_buffer, syntax_table)))
+         && (BASE_EQ (cp->syntax_table, Qt)
+             || BASE_EQ (cp->syntax_table,
+                         BVAR (current_buffer, syntax_table)))
          && !NILP (Fequal (cp->f_whitespace_regexp, Vsearch_spaces_regexp))
          && cp->buf.charset_unibyte == charset_unibyte)
        break;
@@ -2892,7 +2893,7 @@ Return value is undefined if the last search failed.  */)
       ptrdiff_t start = search_regs.start[i];
       if (start >= 0)
        {
-         if (EQ (last_thing_searched, Qt)
+         if (BASE_EQ (last_thing_searched, Qt)
              || ! NILP (integers))
            {
              XSETFASTINT (data[2 * i], start);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]