diff options
| author | Dmitry Gutov | 2021-02-04 03:38:27 +0200 |
|---|---|---|
| committer | Dmitry Gutov | 2021-02-04 03:38:42 +0200 |
| commit | c07ebfcbe084e8219d8c2588f23f77ba4ef39087 (patch) | |
| tree | 82b5287694f86d6a5d83438c8f723b7fb0abbfe8 | |
| parent | b81516c7fb558c9b4bc44e6e69f6729a5f2f9894 (diff) | |
| download | emacs-c07ebfcbe084e8219d8c2588f23f77ba4ef39087.tar.gz emacs-c07ebfcbe084e8219d8c2588f23f77ba4ef39087.zip | |
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.
| -rw-r--r-- | lisp/progmodes/project.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index fc5e30111e5..abe563bec04 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -725,6 +725,7 @@ requires quoting, e.g. `\\[quoted-insert]<space>'." | |||
| 725 | (require 'xref) | 725 | (require 'xref) |
| 726 | (require 'grep) | 726 | (require 'grep) |
| 727 | (let* ((pr (project-current t)) | 727 | (let* ((pr (project-current t)) |
| 728 | (default-directory (project-root pr)) | ||
| 728 | (files | 729 | (files |
| 729 | (if (not current-prefix-arg) | 730 | (if (not current-prefix-arg) |
| 730 | (project-files pr) | 731 | (project-files pr) |
| @@ -756,6 +757,7 @@ pattern to search for." | |||
| 756 | (interactive (list (project--read-regexp))) | 757 | (interactive (list (project--read-regexp))) |
| 757 | (require 'xref) | 758 | (require 'xref) |
| 758 | (let* ((pr (project-current t)) | 759 | (let* ((pr (project-current t)) |
| 760 | (default-directory (project-root pr)) | ||
| 759 | (files | 761 | (files |
| 760 | (project-files pr (cons | 762 | (project-files pr (cons |
| 761 | (project-root pr) | 763 | (project-root pr) |