emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 543568b: Fix one more 2019-08-04 regex lint


From: Paul Eggert
Subject: [Emacs-diffs] master 543568b: Fix one more 2019-08-04 regex lint
Date: Sun, 4 Aug 2019 18:55:00 -0400 (EDT)

branch: master
commit 543568b602bcf2f3496d0a340317682c48a9a923
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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.
---
 lisp/isearch.el | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index 97c75b2..0972903 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2184,16 +2184,19 @@ matches arbitrary non-symbol whitespace.  Otherwise if 
LAX is non-nil,
 the beginning or the end of the string need not match a symbol boundary."
   (let ((not-word-symbol-re
         ;; This regexp matches all syntaxes except word and symbol syntax.
-        ;; FIXME: Replace it with something shorter if possible (bug#14602).
-        
"\\(?:\\s-\\|\\s.\\|\\s(\\|\\s)\\|\\s\"\\|\\s\\\\|\\s/\\|\\s$\\|\\s'\\|\\s<\\|\\s>\\|\\s@\\|\\s!\\|\\s|\\)+"))
+        
"\\(?:\\s-\\|\\s.\\|\\s(\\|\\s)\\|\\s\"\\|\\s\\\\|\\s/\\|\\s$\\|\\s'\\|\\s<\\|\\s>\\|\\s!\\|\\s|\\)+"))
     (cond
      ((equal string "") "")
-     ((string-match-p (format "\\`%s\\'" not-word-symbol-re) string) 
not-word-symbol-re)
+     ((string-match-p (format "\\`%s\\'" not-word-symbol-re) string)
+      not-word-symbol-re)
      (t (concat
-        (if (string-match-p (format "\\`%s" not-word-symbol-re) string) 
not-word-symbol-re
+        (if (string-match-p (format "\\`%s" not-word-symbol-re) string)
+            not-word-symbol-re
           "\\_<")
-        (mapconcat 'regexp-quote (split-string string not-word-symbol-re t) 
not-word-symbol-re)
-        (if (string-match-p (format "%s\\'" not-word-symbol-re) string) 
not-word-symbol-re
+        (mapconcat 'regexp-quote (split-string string not-word-symbol-re t)
+                   not-word-symbol-re)
+        (if (string-match-p (format "%s\\'" not-word-symbol-re) string)
+            not-word-symbol-re
           (unless lax "\\_>")))))))
 
 ;; Search with lax whitespace



reply via email to

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