[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3968fa6: Avoid empty -path arguments in rgrep
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 3968fa6: Avoid empty -path arguments in rgrep |
Date: |
Wed, 30 Sep 2015 07:41:16 +0000 |
branch: master
commit 3968fa6a44275c16d82704fd29621ac1757bca63
Author: Phil Sainty <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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)
---
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 3240ee8..452a42f 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -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 ")")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 3968fa6: Avoid empty -path arguments in rgrep,
Eli Zaretskii <=