diff options
| author | Paul Eggert | 2018-08-05 18:41:20 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-08-05 19:36:10 -0700 |
| commit | 03dfb6061bfd78d74564d678213ef95728a5f9eb (patch) | |
| tree | ab203ec6be71c599f7fb3bccdf5a8aa4832c3372 /src/search.c | |
| parent | 3a6abe65c1324361bf0efcb65df61d22a39cfaaf (diff) | |
| download | emacs-03dfb6061bfd78d74564d678213ef95728a5f9eb.tar.gz emacs-03dfb6061bfd78d74564d678213ef95728a5f9eb.zip | |
Simplify regex-emacs by assuming Emacs syntax
* src/regex-emacs.c (reg_syntax_t)
(RE_BACKSLASH_ESCAPE_IN_LISTS, RE_BK_PLUS_QM)
(RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS)
(RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS)
(RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE)
(RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT)
(RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS)
(RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES)
(RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING)
(RE_NO_GNU_OPS, RE_FRUGAL, RE_SHY_GROUPS)
(RE_NO_NEWLINE_ANCHOR, RE_SYNTAX_EMACS, RE_TRANSLATE_P):
Remove. All uses removed and resulting code simplified.
(TRANSLATE): Treat nil as an absent translation table, not zero.
All uses changed.
Diffstat (limited to 'src/search.c')
| -rw-r--r-- | src/search.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/search.c b/src/search.c index f758bb9304a..4e5a2530114 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -132,7 +132,7 @@ compile_pattern_1 (struct regexp_cache *cp, Lisp_Object pattern, | |||
| 132 | 132 | ||
| 133 | eassert (!cp->busy); | 133 | eassert (!cp->busy); |
| 134 | cp->regexp = Qnil; | 134 | cp->regexp = Qnil; |
| 135 | cp->buf.translate = (! NILP (translate) ? translate : make_number (0)); | 135 | cp->buf.translate = translate; |
| 136 | cp->posix = posix; | 136 | cp->posix = posix; |
| 137 | cp->buf.multibyte = STRING_MULTIBYTE (pattern); | 137 | cp->buf.multibyte = STRING_MULTIBYTE (pattern); |
| 138 | cp->buf.charset_unibyte = charset_unibyte; | 138 | cp->buf.charset_unibyte = charset_unibyte; |
| @@ -238,7 +238,7 @@ compile_pattern (Lisp_Object pattern, struct re_registers *regp, | |||
| 238 | && !cp->busy | 238 | && !cp->busy |
| 239 | && STRING_MULTIBYTE (cp->regexp) == STRING_MULTIBYTE (pattern) | 239 | && STRING_MULTIBYTE (cp->regexp) == STRING_MULTIBYTE (pattern) |
| 240 | && !NILP (Fstring_equal (cp->regexp, pattern)) | 240 | && !NILP (Fstring_equal (cp->regexp, pattern)) |
| 241 | && EQ (cp->buf.translate, (! NILP (translate) ? translate : make_number (0))) | 241 | && EQ (cp->buf.translate, translate) |
| 242 | && cp->posix == posix | 242 | && cp->posix == posix |
| 243 | && (EQ (cp->syntax_table, Qt) | 243 | && (EQ (cp->syntax_table, Qt) |
| 244 | || EQ (cp->syntax_table, BVAR (current_buffer, syntax_table))) | 244 | || EQ (cp->syntax_table, BVAR (current_buffer, syntax_table))) |