From 32ed6e610f4a29a6adebc89a7b37d1b4beb54ec1 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Wed, 1 Nov 2023 22:48:23 +0200 Subject: [PATCH] (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). --- lisp/progmodes/project.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) -- 2.39.2