From ec13f4b344fc8f840647209137e29be470143969 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 10 May 2015 20:43:54 +0300 Subject: [PATCH] semantic/symref/grep: Don't use word boundaries * lisp/cedet/semantic/symref/grep.el (semantic-symref-perform-search): Instead of wrapping input in word boundaries, check that the characters before and after are not word constituents. --- lisp/cedet/semantic/symref/grep.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el index 3cf841e4f2c..6325eb4a396 100644 --- a/lisp/cedet/semantic/symref/grep.el +++ b/lisp/cedet/semantic/symref/grep.el @@ -158,7 +158,11 @@ This shell should support pipe redirect syntax." (cond ((eq (oref tool :searchtype) 'regexp) (oref tool searchfor)) (t - (concat "\\<" (oref tool searchfor) "\\>"))))) + ;; Can't use the word boundaries: Grep + ;; doesn't always agrees with the language + ;; syntax on those. + (format "\\(^\\|\\W\\)%s\\(\\W\\|$\\)" + (oref tool searchfor)))))) ;; Misc (b (get-buffer-create "*Semantic SymRef*")) (ans nil) -- 2.39.5