summaryrefslogtreecommitdiff
path: root/lisp/dired-aux.el
diff options
context:
space:
mode:
authorSpencer Baugh <sbaugh@janestreet.com>2024-05-22 08:28:07 -0400
committerDmitry Gutov <dmitry@gutov.dev>2024-05-24 23:04:32 +0300
commitc812c935486010bfe2f80c3887c708fbaa4907a6 (patch)
treeb65414051d62d5ee76edd70ac110f80fad3fd21d /lisp/dired-aux.el
parent59d7730a46a4a51a2c7e3c800a1d60f92a2322b6 (diff)
Fix usage of cons cells in grep-find-ignored-files
grep-find-ignored-files is documented to also include cons cells, not just globs, but there were two places outside grep.el where we were using it as if it was only a string list. To fix this, add a helper function named grep-find-ignored-files which handles grep-find-ignored-files properly and returns the list of globs, and use it everywhere. * lisp/progmodes/grep.el (grep--filter-list-by-dir) (grep-find-ignored-files): New functions. (rgrep-find-ignored-directories): Use grep--filter-list-by-dir. (lgrep, rgrep-default-command): Use grep-find-ignored-files function. * lisp/dired-aux.el (dired-do-find-regexp): Use grep-find-ignored-files function. * lisp/progmodes/project.el (project-ignores): Use grep-find-ignored-files function, if bound. (bug#71115)
Diffstat (limited to 'lisp/dired-aux.el')
-rw-r--r--lisp/dired-aux.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index bb911513321..ddacd2600d0 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -3851,13 +3851,13 @@ REGEXP should use constructs supported by your local `grep' command."
(interactive "sSearch marked files (regexp): " dired-mode)
(require 'grep)
(require 'xref)
- (defvar grep-find-ignored-files)
(declare-function rgrep-find-ignored-directories "grep" (dir))
+ (declare-function grep-find-ignored-files "grep" (dir))
(let* ((marks (dired-get-marked-files nil nil nil nil t))
(ignores (nconc (mapcar
#'file-name-as-directory
(rgrep-find-ignored-directories default-directory))
- grep-find-ignored-files))
+ (grep-find-ignored-files default-directory)))
(fetcher
(lambda ()
(let (files xrefs)