; * lisp/cedet/semantic/symref/grep.el: Use grep quoting, not egrep.

Kindly noticed by Dmitry Gutov.
This commit is contained in:
Mattias Engdegård 2021-09-19 09:29:33 +02:00
parent bc59c98f09
commit 7880d3079d

View 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)