emacs-devel
[Top][All Lists]
Advanced

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

Re: trunk r115265: * lisp/vc/vc-dispatcher.el (vc-log-edit): Setup the S


From: Dmitry Gutov
Subject: Re: trunk r115265: * lisp/vc/vc-dispatcher.el (vc-log-edit): Setup the Summary&Author headers.
Date: Tue, 03 Dec 2013 04:17:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

On 02.12.2013 15:53, Stefan Monnier wrote:
It's probably the case that log-edit-hide-buf needs to be revisited,
since it dates to before the rewrite of display-buffer, where Martin
arranged to better be able to "undo" a display-buffer (via bury-buffer
or quit-window).

The patch below seems to work. It still feels duct tapey, but I haven't found a way to make `pop-to-buffer' split one specific window, short of writing a new display-buffer-function.


=== modified file 'lisp/vc/log-edit.el'
--- lisp/vc/log-edit.el 2013-12-02 22:13:51 +0000
+++ lisp/vc/log-edit.el 2013-12-03 01:53:23 +0000
@@ -480,13 +480,8 @@

 (defun log-edit-hide-buf (&optional buf where)
   (when (setq buf (get-buffer (or buf log-edit-files-buf)))
-    ;; FIXME: Should use something like `quit-windows-on' here, but
-    ;; that function never deletes this buffer's window because it
-    ;; was created using `cvs-pop-to-buffer-same-frame'.
     (save-selected-window
-      (let ((win (get-buffer-window buf where)))
-        (if win (ignore-errors (delete-window win))))
-      (bury-buffer buf))))
+      (quit-windows-on buf))))

 (defun log-edit-add-new-comment (comment)
   (when (or (ring-empty-p log-edit-comment-ring)

=== modified file 'lisp/vc/pcvs-util.el'
--- lisp/vc/pcvs-util.el        2013-08-05 14:26:57 +0000
+++ lisp/vc/pcvs-util.el        2013-12-03 02:07:30 +0000
@@ -89,7 +89,10 @@
(or (let ((buf (get-buffer-window buf))) (and buf (select-window buf)))
        (and pop-up-windows
             (ignore-errors (select-window (split-window-below)))
-            (switch-to-buffer buf nil 'force-same-window))
+             (prog1
+                 (switch-to-buffer buf t 'force-same-window)
+               (set-window-prev-buffers nil nil)
+ (display-buffer-record-window 'window nil (current-buffer))))
        (pop-to-buffer (current-buffer)))))

 (defun cvs-bury-buffer (buf &optional mainbuf)




reply via email to

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