aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2019-08-04 15:54:17 -0700
committerPaul Eggert2019-08-04 15:54:56 -0700
commit543568b602bcf2f3496d0a340317682c48a9a923 (patch)
tree31f34d3b7304c856e41aa690d121f0e9903e558a
parent4cd41ba8def704ce3bd2f3806176815fd696fa57 (diff)
downloademacs-543568b602bcf2f3496d0a340317682c48a9a923.tar.gz
emacs-543568b602bcf2f3496d0a340317682c48a9a923.zip
Fix one more 2019-08-04 regex lint
Problem clarified by Mattias EngdegÄrd in: https://lists.gnu.org/r/emacs-devel/2019-08/msg00087.html * lisp/isearch.el (isearch-symbol-regexp): Remove \s@ from regexp as it cannot match.
-rw-r--r--lisp/isearch.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 97c75b2978b..09729034d74 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2184,16 +2184,19 @@ matches arbitrary non-symbol whitespace. Otherwise if LAX is non-nil,
2184the beginning or the end of the string need not match a symbol boundary." 2184the beginning or the end of the string need not match a symbol boundary."
2185 (let ((not-word-symbol-re 2185 (let ((not-word-symbol-re
2186 ;; This regexp matches all syntaxes except word and symbol syntax. 2186 ;; This regexp matches all syntaxes except word and symbol syntax.
2187 ;; FIXME: Replace it with something shorter if possible (bug#14602). 2187 "\\(?:\\s-\\|\\s.\\|\\s(\\|\\s)\\|\\s\"\\|\\s\\\\|\\s/\\|\\s$\\|\\s'\\|\\s<\\|\\s>\\|\\s!\\|\\s|\\)+"))
2188 "\\(?:\\s-\\|\\s.\\|\\s(\\|\\s)\\|\\s\"\\|\\s\\\\|\\s/\\|\\s$\\|\\s'\\|\\s<\\|\\s>\\|\\s@\\|\\s!\\|\\s|\\)+"))
2189 (cond 2188 (cond
2190 ((equal string "") "") 2189 ((equal string "") "")
2191 ((string-match-p (format "\\`%s\\'" not-word-symbol-re) string) not-word-symbol-re) 2190 ((string-match-p (format "\\`%s\\'" not-word-symbol-re) string)
2191 not-word-symbol-re)
2192 (t (concat 2192 (t (concat
2193 (if (string-match-p (format "\\`%s" not-word-symbol-re) string) not-word-symbol-re 2193 (if (string-match-p (format "\\`%s" not-word-symbol-re) string)
2194 not-word-symbol-re
2194 "\\_<") 2195 "\\_<")
2195 (mapconcat 'regexp-quote (split-string string not-word-symbol-re t) not-word-symbol-re) 2196 (mapconcat 'regexp-quote (split-string string not-word-symbol-re t)
2196 (if (string-match-p (format "%s\\'" not-word-symbol-re) string) not-word-symbol-re 2197 not-word-symbol-re)
2198 (if (string-match-p (format "%s\\'" not-word-symbol-re) string)
2199 not-word-symbol-re
2197 (unless lax "\\_>"))))))) 2200 (unless lax "\\_>")))))))
2198 2201
2199;; Search with lax whitespace 2202;; Search with lax whitespace