emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ec13f4b 5/5: semantic/symref/grep: Don't use word b


From: Dmitry Gutov
Subject: [Emacs-diffs] master ec13f4b 5/5: semantic/symref/grep: Don't use word boundaries
Date: Sun, 10 May 2015 17:46:34 +0000

branch: master
commit ec13f4b344fc8f840647209137e29be470143969
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    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 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/lisp/cedet/semantic/symref/grep.el 
b/lisp/cedet/semantic/symref/grep.el
index 3cf841e..6325eb4 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]