aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias EngdegÄrd2023-06-19 10:25:15 +0200
committerMattias EngdegÄrd2023-06-19 10:37:22 +0200
commit075e77ac449386c07a4b90e052d1bef7c6a38771 (patch)
treed1760e3c6585b5b0405f517af64046b751915261
parentedb0862f5e69240de90c30b8914af51778f26d31 (diff)
downloademacs-075e77ac449386c07a4b90e052d1bef7c6a38771.tar.gz
emacs-075e77ac449386c07a4b90e052d1bef7c6a38771.zip
* src/regex-emacs.c (regex_compile): Remove useless condition
This condition didn't have any visible effect (as ^ is not a repetition operator); all it did was to generate slightly worse regexp bytecode for out-of-place (literal) ^ in the midst of literal characters (bug#64128).
-rw-r--r--src/regex-emacs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regex-emacs.c b/src/regex-emacs.c
index e3237cd425a..fea34df991b 100644
--- a/src/regex-emacs.c
+++ b/src/regex-emacs.c
@@ -2597,7 +2597,7 @@ regex_compile (re_char *pattern, ptrdiff_t size,
2597 2597
2598 /* If followed by a repetition operator. */ 2598 /* If followed by a repetition operator. */
2599 || (p != pend 2599 || (p != pend
2600 && (*p == '*' || *p == '+' || *p == '?' || *p == '^')) 2600 && (*p == '*' || *p == '+' || *p == '?'))
2601 || (p + 1 < pend && p[0] == '\\' && p[1] == '{')) 2601 || (p + 1 < pend && p[0] == '\\' && p[1] == '{'))
2602 { 2602 {
2603 /* Start building a new exactn. */ 2603 /* Start building a new exactn. */