diff options
| author | Phil Sainty | 2015-09-30 10:39:21 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2015-09-30 10:39:21 +0300 |
| commit | 3968fa6a44275c16d82704fd29621ac1757bca63 (patch) | |
| tree | bae6d50ae09b12f787e063701bb655f9557590ee | |
| parent | 47089e0cc85906831f5d078d460a581ad70d963a (diff) | |
| download | emacs-3968fa6a44275c16d82704fd29621ac1757bca63.tar.gz emacs-3968fa6a44275c16d82704fd29621ac1757bca63.zip | |
Avoid empty -path arguments in rgrep
* lisp/progmodes/grep.el (rgrep-default-command): Remove nil from
the list produced according to grep-find-ignored-directories,
before passing it to Find/Grep invocation. (Bug#21548)
| -rw-r--r-- | lisp/progmodes/grep.el | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 3240ee8a0db..452a42f4bc2 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -1039,16 +1039,18 @@ to specify a command to run." | |||
| 1039 | ;; we should use shell-quote-argument here | 1039 | ;; we should use shell-quote-argument here |
| 1040 | " -path " | 1040 | " -path " |
| 1041 | (mapconcat | 1041 | (mapconcat |
| 1042 | #'(lambda (ignore) | 1042 | 'identity |
| 1043 | (cond ((stringp ignore) | 1043 | (delq nil (mapcar |
| 1044 | (shell-quote-argument | 1044 | #'(lambda (ignore) |
| 1045 | (concat "*/" ignore))) | 1045 | (cond ((stringp ignore) |
| 1046 | ((consp ignore) | 1046 | (shell-quote-argument |
| 1047 | (and (funcall (car ignore) dir) | 1047 | (concat "*/" ignore))) |
| 1048 | (shell-quote-argument | 1048 | ((consp ignore) |
| 1049 | (concat "*/" | 1049 | (and (funcall (car ignore) dir) |
| 1050 | (cdr ignore))))))) | 1050 | (shell-quote-argument |
| 1051 | grep-find-ignored-directories | 1051 | (concat "*/" |
| 1052 | (cdr ignore))))))) | ||
| 1053 | grep-find-ignored-directories)) | ||
| 1052 | " -o -path ") | 1054 | " -o -path ") |
| 1053 | " " | 1055 | " " |
| 1054 | (shell-quote-argument ")") | 1056 | (shell-quote-argument ")") |