Commit 3968fa6a authored by Phil Sainty's avatar Phil Sainty Committed by Eli Zaretskii

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)
parent 47089e0c
......@@ -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 ")")
......
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