emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 2d7d98e: Restore vc-revision-other-window buffer-changing behavio


From: Lars Ingebrigtsen
Subject: master 2d7d98e: Restore vc-revision-other-window buffer-changing behaviour
Date: Fri, 16 Oct 2020 02:36:38 -0400 (EDT)

branch: master
commit 2d7d98e1a6d16e26c34539d66c2cdadba930e816
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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 46c44fa..39d0fab 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]