aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/cedet/semantic/symref/grep.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/cedet/semantic/symref/grep.el b/lisp/cedet/semantic/symref/grep.el
index 4598a2c98ea..3fa1c5ff7d8 100644
--- a/lisp/cedet/semantic/symref/grep.el
+++ b/lisp/cedet/semantic/symref/grep.el
@@ -87,6 +87,9 @@ Optional argument MODE specifies the `major-mode' to test."
87 (error "Customize `semantic-symref-filepattern-alist' for %s" major-mode)) 87 (error "Customize `semantic-symref-filepattern-alist' for %s" major-mode))
88 ))) 88 )))
89 89
90(defvar grepflags)
91(defvar greppattern)
92
90(defvar semantic-symref-grep-expand-keywords 93(defvar semantic-symref-grep-expand-keywords
91 (condition-case nil 94 (condition-case nil
92 (let* ((kw (copy-alist grep-expand-keywords)) 95 (let* ((kw (copy-alist grep-expand-keywords))
@@ -98,7 +101,7 @@ Optional argument MODE specifies the `major-mode' to test."
98 (error nil)) 101 (error nil))
99 "Grep expand keywords used when expanding templates for symref.") 102 "Grep expand keywords used when expanding templates for symref.")
100 103
101(defun semantic-symref-grep-use-template (rootdir filepattern grepflags greppattern) 104(defun semantic-symref-grep-use-template (rootdir filepattern flags pattern)
102 "Use the grep template expand feature to create a grep command. 105 "Use the grep template expand feature to create a grep command.
103ROOTDIR is the root location to run the `find' from. 106ROOTDIR is the root location to run the `find' from.
104FILEPATTERN is a string representing find flags for searching file patterns. 107FILEPATTERN is a string representing find flags for searching file patterns.
@@ -106,7 +109,9 @@ GREPFLAGS are flags passed to grep, such as -n or -l.
106GREPPATTERN is the pattern used by grep." 109GREPPATTERN is the pattern used by grep."
107 ;; We have grep-compute-defaults. Let's use it. 110 ;; We have grep-compute-defaults. Let's use it.
108 (grep-compute-defaults) 111 (grep-compute-defaults)
109 (let* ((grep-expand-keywords semantic-symref-grep-expand-keywords) 112 (let* ((grepflags flags)
113 (greppattern pattern)
114 (grep-expand-keywords semantic-symref-grep-expand-keywords)
110 (cmd (grep-expand-template 115 (cmd (grep-expand-template
111 (if (memq system-type '(windows-nt ms-dos)) 116 (if (memq system-type '(windows-nt ms-dos))
112 ;; grep-find uses '--color=always' on MS-Windows 117 ;; grep-find uses '--color=always' on MS-Windows
@@ -141,7 +146,6 @@ This shell should support pipe redirect syntax."
141 ) 146 )
142 ;; Find the root of the project, and do a find-grep... 147 ;; Find the root of the project, and do a find-grep...
143 (let* (;; Find the file patterns to use. 148 (let* (;; Find the file patterns to use.
144 (pat (cdr (assoc major-mode semantic-symref-filepattern-alist)))
145 (rootdir (semantic-symref-calculate-rootdir)) 149 (rootdir (semantic-symref-calculate-rootdir))
146 (filepattern (semantic-symref-derive-find-filepatterns)) 150 (filepattern (semantic-symref-derive-find-filepatterns))
147 ;; Grep based flags. 151 ;; Grep based flags.