]> git.eshelyaron.com Git - emacs.git/commit
Fix usage of cons cells in grep-find-ignored-files
authorSpencer Baugh <sbaugh@janestreet.com>
Wed, 22 May 2024 12:28:07 +0000 (08:28 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sun, 26 May 2024 05:55:27 +0000 (07:55 +0200)
commitba974705d2f9a3589d94a824d67a684839a0837f
treee456198f828e635b1df6387255d404c20e85cc4b
parentda271f828f6df1c2313dd42cada6a1bac0c4b7db
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)

(cherry picked from commit c812c935486010bfe2f80c3887c708fbaa4907a6)
lisp/dired-aux.el
lisp/progmodes/grep.el
lisp/progmodes/project.el