From: Dmitry Gutov Date: Wed, 1 Nov 2023 20:48:23 +0000 (+0200) Subject: (project-switch-project): Fix the previous change X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=32ed6e610f4a29a6adebc89a7b37d1b4beb54ec1;p=emacs.git (project-switch-project): Fix the previous change * lisp/progmodes/project.el (project-switch-project): Clear the buffer-local value in the right buffer (bug#66317). --- diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el index 5129dc98b82..57d9d8e99ab 100644 --- a/lisp/progmodes/project.el +++ b/lisp/progmodes/project.el @@ -2029,12 +2029,14 @@ to directory DIR." (interactive (list (funcall project-prompter))) (let ((command (if (symbolp project-switch-commands) project-switch-commands - (project--switch-project-command)))) + (project--switch-project-command))) + (buffer (current-buffer))) (unwind-protect (progn (setq-local project-current-directory-override dir) (call-interactively command)) - (kill-local-variable 'project-current-directory-override)))) + (with-current-buffer buffer + (kill-local-variable 'project-current-directory-override))))) ;;;###autoload (defun project-uniquify-dirname-transform (dirname)