Skip to content

Commit

Permalink
; * lisp/cedet/semantic/symref/grep.el: Use grep quoting, not egrep.
Browse files Browse the repository at this point in the history
Kindly noticed by Dmitry Gutov.
  • Loading branch information
mattiase committed Sep 19, 2021
1 parent bc59c98 commit 7880d30
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lisp/cedet/semantic/symref/grep.el
Expand Up @@ -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))

Expand All @@ -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)
Expand Down

0 comments on commit 7880d30

Please sign in to comment.