diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2023-07-21 14:44:53 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2023-07-21 14:49:17 +0200 |
commit | b9a910a701a792825462a75332a9aec6824fe874 (patch) | |
tree | fa9893424a79a7efbba5b1b70027e994a0e4f2ae /src/search.c | |
parent | 3b5f13dc49f3a2a7afd25a2ab05787c7d81918a0 (diff) | |
download | emacs-b9a910a701a792825462a75332a9aec6824fe874.tar.gz |
Use BASE_EQ instead of EQ in search.c
* src/search.c (clear_regexp_cache, compile_pattern, Fmatch_data):
Use BASE_EQ where appropriate.
Diffstat (limited to 'src/search.c')
-rw-r--r-- | src/search.c | 11 |
1 files 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); |