mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-11 14:01:43 -08:00
Bind default-directory to the project root
* lisp/progmodes/project.el (project-find-regexp):
Bind default-directory to the project root, to save this value
in the resulting buffer (esp. if the project selector was used,
(https://lists.gnu.org/archive/html/emacs-devel/2021-02/msg00140.html).
(project-or-external-find-regexp): Same.
(cherry picked from commit c07ebfcbe0)
This commit is contained in:
parent
19534f988c
commit
b99848c72c
1 changed files with 2 additions and 0 deletions
|
|
@ -441,6 +441,7 @@ requires quoting, e.g. `\\[quoted-insert]<space>'."
|
|||
(require 'xref)
|
||||
(require 'grep)
|
||||
(let* ((pr (project-current t))
|
||||
(default-directory (project-root pr))
|
||||
(files
|
||||
(if (not current-prefix-arg)
|
||||
(project-files pr (project-roots pr))
|
||||
|
|
@ -473,6 +474,7 @@ pattern to search for."
|
|||
(interactive (list (project--read-regexp)))
|
||||
(require 'xref)
|
||||
(let* ((pr (project-current t))
|
||||
(default-directory (project-root pr))
|
||||
(files
|
||||
(project-files pr (append
|
||||
(project-roots pr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue