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)
This commit is contained in:
parent
47089e0cc8
commit
3968fa6a44
1 changed files with 12 additions and 10 deletions
|
@ -1039,16 +1039,18 @@ to specify a command to run."
|
|||
;; we should use shell-quote-argument here
|
||||
" -path "
|
||||
(mapconcat
|
||||
#'(lambda (ignore)
|
||||
(cond ((stringp ignore)
|
||||
(shell-quote-argument
|
||||
(concat "*/" ignore)))
|
||||
((consp ignore)
|
||||
(and (funcall (car ignore) dir)
|
||||
(shell-quote-argument
|
||||
(concat "*/"
|
||||
(cdr ignore)))))))
|
||||
grep-find-ignored-directories
|
||||
'identity
|
||||
(delq nil (mapcar
|
||||
#'(lambda (ignore)
|
||||
(cond ((stringp ignore)
|
||||
(shell-quote-argument
|
||||
(concat "*/" ignore)))
|
||||
((consp ignore)
|
||||
(and (funcall (car ignore) dir)
|
||||
(shell-quote-argument
|
||||
(concat "*/"
|
||||
(cdr ignore)))))))
|
||||
grep-find-ignored-directories))
|
||||
" -o -path ")
|
||||
" "
|
||||
(shell-quote-argument ")")
|
||||
|
|
Loading…
Add table
Reference in a new issue