+2013-12-02 Dmitry Gutov <dgutov@yandex.ru>
+
+ * vc/log-edit.el (log-edit-kill-buffer): Move the use of
+ `save-selected-window' to `log-edit-hide-buf'. This makes
+ `log-edit-show-files' idempotent.
+ (log-edit-show-files): Mark the new window as dedicated.
+
2013-12-02 Dmitry Gutov <dgutov@yandex.ru>
* vc/log-edit.el (log-edit-mode-map): Add binding for
;; 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'.
- (let ((win (get-buffer-window buf where)))
- (if win (ignore-errors (delete-window win))))
- (bury-buffer buf)))
+ (save-selected-window
+ (let ((win (get-buffer-window buf where)))
+ (if win (ignore-errors (delete-window win))))
+ (bury-buffer buf))))
(defun log-edit-add-new-comment (comment)
(when (or (ring-empty-p log-edit-comment-ring)
`log-edit-files-buf'."
(interactive)
(log-edit-add-new-comment (buffer-string))
- (save-selected-window
- (log-edit-hide-buf))
+ (log-edit-hide-buf)
(let ((buf (current-buffer)))
(quit-windows-on buf)
(kill-buffer buf)))
(save-selected-window
(cvs-pop-to-buffer-same-frame buf)
(shrink-window-if-larger-than-buffer)
+ (set-window-dedicated-p (selected-window) t)
(selected-window)))))
(defun log-edit-beginning-of-line (&optional n)