diff options
| author | Stefan Monnier | 2015-05-06 09:44:30 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2015-05-06 09:44:30 -0400 |
| commit | 7ddf29d8f5ec0bcde166553134596a1150bda971 (patch) | |
| tree | 39792a7a295e0a51144bf1cfdf27c04f3b5de33e | |
| parent | 9b96a612cafd224092e1651a167fab193772d6bf (diff) | |
| download | emacs-7ddf29d8f5ec0bcde166553134596a1150bda971.tar.gz emacs-7ddf29d8f5ec0bcde166553134596a1150bda971.zip | |
* lisp/cedet/semantic/symref/grep.el: Fix unused var warnings
* lisp/cedet/semantic/symref/grep.el (grepflags, greppattern): Declare.
(semantic-symref-perform-search): Remove unused var `pat'.
| -rw-r--r-- | lisp/cedet/semantic/symref/grep.el | 10 |
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. |
| 103 | ROOTDIR is the root location to run the `find' from. | 106 | ROOTDIR is the root location to run the `find' from. |
| 104 | FILEPATTERN is a string representing find flags for searching file patterns. | 107 | FILEPATTERN 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. | |||
| 106 | GREPPATTERN is the pattern used by grep." | 109 | GREPPATTERN 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. |