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.
This commit is contained in:
parent
81fe8990c0
commit
f3dbde7e6f
2 changed files with 10 additions and 5 deletions
5
etc/NEWS
5
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
|
||||
|
||||
+++
|
||||
|
|
|
@ -703,11 +703,6 @@ The value depends on `grep-command', `grep-template',
|
|||
(let ((grep-options
|
||||
(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)
|
||||
|
@ -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: "
|
||||
|
|
Loading…
Add table
Reference in a new issue