From 2d7d98e1a6d16e26c34539d66c2cdadba930e816 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 16 Oct 2020 08:36:21 +0200 Subject: [PATCH] Restore vc-revision-other-window buffer-changing behaviour * lisp/vc/vc.el (vc-revision-other-window): This function used to change the current buffer, but this was changed in the previous patch for indirect buffer support. Ensure that it still does this, because this is what the callers expect (bug#44026). --- lisp/vc/vc.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 46c44fa54b7..39d0fab391d 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2058,13 +2058,13 @@ If `F.~REV~' already exists, use it instead of checking it out again." (list (vc-read-revision "Revision to visit (default is working revision): " (list buffer-file-name))))) - (with-current-buffer (or (buffer-base-buffer) (current-buffer)) - (vc-ensure-vc-buffer) - (let* ((file buffer-file-name) - (revision (if (string-equal rev "") - (vc-working-revision file) - rev))) - (switch-to-buffer-other-window (vc-find-revision file revision))))) + (set-buffer (or (buffer-base-buffer) (current-buffer))) + (vc-ensure-vc-buffer) + (let* ((file buffer-file-name) + (revision (if (string-equal rev "") + (vc-working-revision file) + rev))) + (switch-to-buffer-other-window (vc-find-revision file revision)))) (defun vc-find-revision (file revision &optional backend) "Read REVISION of FILE into a buffer and return the buffer. -- 2.39.2