From: Lars Ingebrigtsen Date: Fri, 16 Oct 2020 06:36:21 +0000 (+0200) Subject: Restore vc-revision-other-window buffer-changing behaviour X-Git-Tag: emacs-28.0.90~5614 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2d7d98e1a6d16e26c34539d66c2cdadba930e816;p=emacs.git 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). --- 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.