Commit d499c5b9 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(add-change-log-entry): Avoid displaying the changelog a second time.

parent 7fdbcd83
2009-11-13 Stefan Monnier <monnier@iro.umontreal.ca>
* add-log.el (add-change-log-entry): Avoid displaying the changelog
a second time.
* x-dnd.el (x-dnd-maybe-call-test-function):
* window.el (split-window-vertically):
* whitespace.el (whitespace-help-on):
......
......@@ -807,9 +807,15 @@ non-nil, otherwise in local time."
(item (add-log-file-name buffer-file file-name)))
(unless (equal file-name buffer-file-name)
(if (or other-window (window-dedicated-p (selected-window)))
(find-file-other-window file-name)
(find-file file-name)))
(cond
((equal file-name (buffer-file-name (window-buffer (selected-window))))
;; If the selected window already shows the desired buffer don't show
;; it again (particularly important if other-window is true).
;; This is important for diff-add-change-log-entries-other-window.
(set-buffer (window-buffer (selected-window))))
((or other-window (window-dedicated-p (selected-window)))
(find-file-other-window file-name))
(t (find-file file-name))))
(or (derived-mode-p 'change-log-mode)
(change-log-mode))
(undo-boundary)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment