Commit df9db151 authored by Juri Linkov's avatar Juri Linkov
Browse files

* progmodes/grep.el (grep-read-files): Fix multi-pattern aliases.

Remove "all" from grep-files-aliases.  Split grep-files-aliases by
whitespace, call wildcard-to-regexp on substrings and concat them
with "\\|".  (Bug#6114)
parent c0209c2c
2010-05-21 Juri Linkov <juri@jurta.org>
* progmodes/grep.el (grep-read-files): Fix multi-pattern aliases.
Remove "all" from grep-files-aliases. Split grep-files-aliases by
whitespace, call wildcard-to-regexp on substrings and concat them
with "\\|". (Bug#6114)
2010-05-21 Alan Mackenzie <acm@muc.de>
* progmodes/cc-engine.el (c-parse-state-get-strategy): Replace
......
......@@ -781,12 +781,17 @@ substitution string. Note dynamic scoping of variables.")
(file-name-nondirectory bn)))
(default-alias
(and fn
(let ((aliases grep-files-aliases)
(let ((aliases (remove (assoc "all" grep-files-aliases)
grep-files-aliases))
alias)
(while aliases
(setq alias (car aliases)
aliases (cdr aliases))
(if (string-match (wildcard-to-regexp (cdr alias)) fn)
(if (string-match (mapconcat
'wildcard-to-regexp
(split-string (cdr alias) nil t)
"\\|")
fn)
(setq aliases nil)
(setq alias nil)))
(cdr alias))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment