summaryrefslogtreecommitdiff
path: root/lisp/progmodes/grep.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-10-09 06:15:02 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-10-09 06:15:07 +0200
commitf3dbde7e6ffabfef7526b04bf2e633250970672d (patch)
tree611990a419c78c69c3ffb719d0dbbec9656ca548 /lisp/progmodes/grep.el
parent81fe8990c0e4c0980e599b6ec9cad6dcb945275a (diff)
downloademacs-f3dbde7e6ffabfef7526b04bf2e633250970672d.tar.gz
Only skip directories in lgrep, not the other grep commands
* lisp/progmodes/grep.el (lgrep): Do the directory ignores here (bug#23590). (grep-compute-defaults): ... instead of here, because this would affect all grep commands, not just lgrep.
Diffstat (limited to 'lisp/progmodes/grep.el')
-rw-r--r--lisp/progmodes/grep.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 6bc187028fb..f028a4279d1 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -704,11 +704,6 @@ The value depends on `grep-command', `grep-template',
(concat (if grep-use-null-device "-n" "-nH")
(if grep-use-null-filename-separator " --null")
(when (grep-probe grep-program
- `(nil nil nil "--directories=skip" "foo"
- ,null-device)
- nil 1)
- " --directories=skip")
- (when (grep-probe grep-program
`(nil nil nil "-e" "foo" ,null-device)
nil 1)
" -e"))))
@@ -1126,6 +1121,11 @@ command before it's run."
grep-find-ignored-files
" --exclude=")))))
(when command
+ (when (grep-probe grep-program
+ `(nil nil nil "--directories=skip" "foo"
+ ,null-device)
+ nil 1)
+ (setq command (concat command " --directories=skip")))
(if confirm
(setq command
(read-from-minibuffer "Confirm: "