; * lisp/cedet/semantic/symref/grep.el: Use grep quoting, not egrep.
authorMattias Engdegård <mattiase@acm.org>
Sun, 19 Sep 2021 07:29:33 +0000 (09:29 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sun, 19 Sep 2021 07:33:21 +0000 (09:33 +0200)
Kindly noticed by Dmitry Gutov.

lisp/cedet/semantic/symref/grep.el

index 1e282c3052c106f31a0cb0b7ed25cb35020c9d2e..077a2d48615bc3346c44026376cd9177f70190a3 100644 (file)
@@ -133,9 +133,9 @@ This shell should support pipe redirect syntax."
   :group 'semantic
   :type 'string)
 
-(defun semantic-symref-grep--quote-extended (string)
-  "Quote STRING as an extended-syntax regexp."
-  (replace-regexp-in-string (rx (in ".^$*+?|{}[]()|\\"))
+(defun semantic-symref-grep--quote-grep (string)
+  "Quote STRING as a grep-syntax regexp."
+  (replace-regexp-in-string (rx (in ".^$*[\\"))
                             (lambda (s) (concat "\\" s))
                             string nil t))
 
@@ -160,7 +160,7 @@ This shell should support pipe redirect syntax."
          (searchfor (oref tool searchfor))
          (greppat (if (eq (oref tool searchtype) 'regexp)
                       searchfor
-                    (semantic-symref-grep--quote-extended searchfor)))
+                    (semantic-symref-grep--quote-grep searchfor)))
         ;; Misc
         (b (get-buffer-create "*Semantic SymRef*"))
         (ans nil)