[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#44026: [PATCH] vc.el: vc-revision-other-window does not select the b
From: |
Koichi Arakawa |
Subject: |
bug#44026: [PATCH] vc.el: vc-revision-other-window does not select the buffer |
Date: |
Fri, 16 Oct 2020 12:14:15 +0900 (東京 (標準時)) |
Hi,
The current version of vc-revision-other-window does not select a
buffer which contains the specified revision. But ediff-vc-internal,
for example, expects the buffer is selected as the current one.
So I think the following patch is needed.
Regards,
Koichi Arakawa
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 46c44fa54b..f34bd0f2a1 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2058,13 +2058,12 @@ 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)))))
+ (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.
- bug#44026: [PATCH] vc.el: vc-revision-other-window does not select the buffer,
Koichi Arakawa <=