emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp ChangeLog add-log.el


From: Stefan Monnier
Subject: [Emacs-diffs] emacs/lisp ChangeLog add-log.el
Date: Fri, 13 Nov 2009 22:54:19 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        09/11/13 22:54:19

Modified files:
        lisp           : ChangeLog add-log.el 

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

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16619&r2=1.16620
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/add-log.el?cvsroot=emacs&r1=1.231&r2=1.232

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16619
retrieving revision 1.16620
diff -u -b -r1.16619 -r1.16620
--- ChangeLog   13 Nov 2009 22:19:45 -0000      1.16619
+++ ChangeLog   13 Nov 2009 22:54:16 -0000      1.16620
@@ -1,5 +1,8 @@
 2009-11-13  Stefan Monnier  <address@hidden>
 
+       * 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):

Index: add-log.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/add-log.el,v
retrieving revision 1.231
retrieving revision 1.232
diff -u -b -r1.231 -r1.232
--- add-log.el  22 Sep 2009 15:39:06 -0000      1.231
+++ add-log.el  13 Nov 2009 22:54:18 -0000      1.232
@@ -807,9 +807,15 @@
         (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)




reply via email to

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