[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f3dbde7: Only skip directories in lgrep, not the other grep comma
From: |
Lars Ingebrigtsen |
Subject: |
master f3dbde7: Only skip directories in lgrep, not the other grep commands |
Date: |
Fri, 9 Oct 2020 00:15:14 -0400 (EDT) |
branch: master
commit f3dbde7e6ffabfef7526b04bf2e633250970672d
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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.
---
etc/NEWS | 5 +++++
lisp/progmodes/grep.el | 10 +++++-----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/etc/NEWS b/etc/NEWS
index 63a740c..e1f9382 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -545,6 +545,11 @@ grep emits SGR ANSI escape sequences to color its output.
The new variable
markers in order to provide highlighting in the source buffer. The variable
can be customized to accommodate other grep-like tools.
+---
+*** The 'lgrep' command now ignores directories.
+On systems where the grep command supports it, directories will be
+skipped.
+
** Help
+++
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 6bc1870..f028a42 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: "
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master f3dbde7: Only skip directories in lgrep, not the other grep commands,
Lars Ingebrigtsen <=