diff options
| author | Dmitry Gutov | 2020-05-30 19:57:06 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2020-05-30 19:57:38 +0300 |
| commit | 780f674a82a90c4e3e32583059b498bfa57e4a06 (patch) | |
| tree | 64c105b1d3a88748368fc42baa916f0357d7c7af | |
| parent | 3dbe6530b124436550dae4db6cd4b7b380e95377 (diff) | |
| download | emacs-780f674a82a90c4e3e32583059b498bfa57e4a06.tar.gz emacs-780f674a82a90c4e3e32583059b498bfa57e4a06.zip | |
Don't return transient projects with MAYBE-PROMPT=nil
* lisp/progmodes/project.el (project-current): Only return
transient projects when called with non-nil MAYBE-PROMPT.
Also only update the known projects lists in this case.
(https://lists.gnu.org/archive/html/emacs-devel/2020-05/msg03375.html).
| -rw-r--r-- | lisp/progmodes/project.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 1f2a4e84718..2d0b6c4a21b 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el | |||
| @@ -115,10 +115,11 @@ the user for a different project to look in." | |||
| 115 | maybe-prompt) | 115 | maybe-prompt) |
| 116 | (setq dir (project-prompt-project-dir) | 116 | (setq dir (project-prompt-project-dir) |
| 117 | pr (project--find-in-directory dir)))) | 117 | pr (project--find-in-directory dir)))) |
| 118 | (if pr | 118 | (when maybe-prompt |
| 119 | (project--add-to-project-list-front pr) | 119 | (if pr |
| 120 | (project--remove-from-project-list dir) | 120 | (project--add-to-project-list-front pr) |
| 121 | (setq pr (cons 'transient dir))) | 121 | (project--remove-from-project-list dir) |
| 122 | (setq pr (cons 'transient dir)))) | ||
| 122 | pr)) | 123 | pr)) |
| 123 | 124 | ||
| 124 | (defun project--find-in-directory (dir) | 125 | (defun project--find-in-directory (dir) |