(error "Customize `semantic-symref-filepattern-alist' for %s" major-mode))
)))
+(defvar grepflags)
+(defvar greppattern)
+
(defvar semantic-symref-grep-expand-keywords
(condition-case nil
(let* ((kw (copy-alist grep-expand-keywords))
(error nil))
"Grep expand keywords used when expanding templates for symref.")
-(defun semantic-symref-grep-use-template (rootdir filepattern grepflags greppattern)
+(defun semantic-symref-grep-use-template (rootdir filepattern flags pattern)
"Use the grep template expand feature to create a grep command.
ROOTDIR is the root location to run the `find' from.
FILEPATTERN is a string representing find flags for searching file patterns.
GREPPATTERN is the pattern used by grep."
;; We have grep-compute-defaults. Let's use it.
(grep-compute-defaults)
- (let* ((grep-expand-keywords semantic-symref-grep-expand-keywords)
+ (let* ((grepflags flags)
+ (greppattern pattern)
+ (grep-expand-keywords semantic-symref-grep-expand-keywords)
(cmd (grep-expand-template
(if (memq system-type '(windows-nt ms-dos))
;; grep-find uses '--color=always' on MS-Windows
)
;; Find the root of the project, and do a find-grep...
(let* (;; Find the file patterns to use.
- (pat (cdr (assoc major-mode semantic-symref-filepattern-alist)))
(rootdir (semantic-symref-calculate-rootdir))
(filepattern (semantic-symref-derive-find-filepatterns))
;; Grep based flags.