mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
Stop project-query-replace-regexp failing on directory symlinks
* lisp/progmodes/project.el (project--files-safe): New function. (project-search, project-query-replace-regexp): Use it (bug#78209).
This commit is contained in:
parent
3b547e4f5d
commit
b7d4681908
1 changed files with 9 additions and 4 deletions
|
|
@ -177,9 +177,9 @@
|
|||
(require 'cl-generic)
|
||||
(require 'cl-lib)
|
||||
(require 'seq)
|
||||
(require 'generator)
|
||||
(eval-when-compile (require 'subr-x))
|
||||
|
||||
(defgroup project nil
|
||||
(defgroup project nil
|
||||
"Operations on the current project."
|
||||
:version "28.1"
|
||||
:group 'tools)
|
||||
|
|
@ -1593,6 +1593,11 @@ create it if it doesn't already exist."
|
|||
|
||||
(declare-function fileloop-continue "fileloop" ())
|
||||
|
||||
(iter-defun project--files-safe ()
|
||||
(dolist (file (project-files (project-current t)))
|
||||
(when (file-regular-p file)
|
||||
(iter-yield file))))
|
||||
|
||||
;;;###autoload
|
||||
(defun project-search (regexp)
|
||||
"Search for REGEXP in all the files of the project.
|
||||
|
|
@ -1602,7 +1607,7 @@ command \\[fileloop-continue]."
|
|||
(interactive "sSearch (regexp): ")
|
||||
(fileloop-initialize-search
|
||||
regexp
|
||||
(project-files (project-current t))
|
||||
(project--files-safe)
|
||||
'default)
|
||||
(fileloop-continue))
|
||||
|
||||
|
|
@ -1623,7 +1628,7 @@ If you exit the `query-replace', you can later continue the
|
|||
(list from to))))
|
||||
(fileloop-initialize-replace
|
||||
from to
|
||||
(project-files (project-current t))
|
||||
(project--files-safe)
|
||||
'default)
|
||||
(fileloop-continue))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue