* 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).
maybe-prompt)
(setq dir (project-prompt-project-dir)
pr (project--find-in-directory dir))))
- (if pr
- (project--add-to-project-list-front pr)
- (project--remove-from-project-list dir)
- (setq pr (cons 'transient dir)))
+ (when maybe-prompt
+ (if pr
+ (project--add-to-project-list-front pr)
+ (project--remove-from-project-list dir)
+ (setq pr (cons 'transient dir))))
pr))
(defun project--find-in-directory (dir)