]> git.eshelyaron.com Git - emacs.git/commitdiff
semantic/symref/grep: Don't use word boundaries
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 10 May 2015 17:43:54 +0000 (20:43 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 10 May 2015 17:45:38 +0000 (20:45 +0300)
* 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

index 3cf841e4f2c74e31697896bd0cf1f7a6deebd2bc..6325eb4a396cbf20468d5b4aee364e152f74bacb 100644 (file)
@@ -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)