vc-setup-buffer: Kill local file-local-variables-alist too

* lisp/vc/vc-dispatcher.el (vc-setup-buffer): Kill
file-local-variables-alist variable, too (bug#44698).
* lisp/vc/vc.el (vc-log-internal-common): Don't call
kill-all-local-variables here, that's vc-setup-buffer's job.
This commit is contained in:
Sean Whitton 2025-03-10 17:08:04 +08:00
parent cbad6215cf
commit e09a80143d
2 changed files with 3 additions and 3 deletions

View file

@ -186,6 +186,9 @@ Another is that undo information is not kept."
;; want any of its output to appear from now on.
(when oldproc (delete-process oldproc)))
(kill-all-local-variables)
;; Kill also this permanent local var in case the VC command that
;; created BUF was invoked from a different directory (bug#44698).
(kill-local-variable 'file-local-variables-alist)
(setq-local vc-parent-buffer camefrom)
(setq-local vc-parent-buffer-name
(concat " from " (buffer-name camefrom)))

View file

@ -2990,9 +2990,6 @@ Each function runs in the log output buffer without args.")
rev-buff-func)
(let (retval (buffer (get-buffer-create buffer-name)))
(with-current-buffer buffer
;; Ensure we drop any directory-local variables from the last
;; directory from which a log buffer was generated (bug#44698).
(kill-all-local-variables 'kill-permanent)
(setq-local vc-log-view-type type))
(setq retval (funcall backend-func backend buffer-name type files))
(with-current-buffer buffer