[Top][All Lists]

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

bug#32475: 27.0.50; Multiple log-view-mode buffers

From: Juri Linkov
Subject: bug#32475: 27.0.50; Multiple log-view-mode buffers
Date: Mon, 20 Aug 2018 00:31:50 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

To support the ability to create multiple *vc-change-log* buffers
with customization like

  (add-hook 'log-view-mode-hook 'rename-uniquely)

vc-log-internal-common needs an improvement to remember and reuse
the buffer object, instead of searching the same buffer by name:

diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index b2bedfae93..487594b2d5 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2268,11 +2268,11 @@ vc-log-internal-common
-  (let (retval)
-    (with-current-buffer (get-buffer-create buffer-name)
+  (let (retval (buffer (get-buffer-create buffer-name)))
+    (with-current-buffer buffer
       (set (make-local-variable 'vc-log-view-type) type))
     (setq retval (funcall backend-func backend buffer-name type files))
-    (with-current-buffer (get-buffer buffer-name)
+    (with-current-buffer buffer
       (let ((inhibit-read-only t))
        ;; log-view-mode used to be called with inhibit-read-only bound
        ;; to t, so let's keep doing it, just in case.
@@ -2283,7 +2283,7 @@ vc-log-internal-common
     ;; Display after setting up major-mode, so display-buffer-alist can know
     ;; the major-mode.
-    (pop-to-buffer buffer-name)
+    (pop-to-buffer buffer)
      (let ((inhibit-read-only t))
        (funcall setup-buttons-func backend files retval)

reply via email to

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