diff options
Diffstat (limited to 'lisp/cedet/semantic/symref')
-rw-r--r-- | lisp/cedet/semantic/symref/grep.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el index 3fa1c5ff7d8..3cf841e4f2c 100644 --- a/lisp/cedet/semantic/symref/grep.el +++ b/lisp/cedet/semantic/symref/grep.el @@ -141,7 +141,7 @@ This shell should support pipe redirect syntax." "Perform a search with Grep." ;; Grep doesn't support some types of searches. (let ((st (oref tool :searchtype))) - (when (not (eq st 'symbol)) + (when (not (memq st '(symbol regexp))) (error "Symref impl GREP does not support searchtype of %s" st)) ) ;; Find the root of the project, and do a find-grep... @@ -150,12 +150,14 @@ This shell should support pipe redirect syntax." (filepattern (semantic-symref-derive-find-filepatterns)) ;; Grep based flags. (grepflags (cond ((eq (oref tool :resulttype) 'file) - "-l ") - (t "-n "))) - (greppat (cond ((eq (oref tool :searchtype) 'regexp) - (oref tool searchfor)) - (t - (shell-quote-argument + "-l ") + ((eq (oref tool :searchtype) 'regexp) + "-nE ") + (t "-n "))) + (greppat (shell-quote-argument + (cond ((eq (oref tool :searchtype) 'regexp) + (oref tool searchfor)) + (t (concat "\\<" (oref tool searchfor) "\\>"))))) ;; Misc (b (get-buffer-create "*Semantic SymRef*")) |