]> git.eshelyaron.com Git - emacs.git/commitdiff
* calendar.el (calendar-basic-setup): Avoid clobbering calendar with diary.
authorGlenn Morris <rgm@gnu.org>
Mon, 8 Sep 2014 05:57:24 +0000 (22:57 -0700)
committerGlenn Morris <rgm@gnu.org>
Mon, 8 Sep 2014 05:57:24 +0000 (22:57 -0700)
Fixes: debbugs:18381
lisp/ChangeLog
lisp/calendar/calendar.el

index 504657358f192d4265dfd37a29024400d0512ab4..2bd234e12e0dbee8ab503ad613817241c302889a 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-08  Glenn Morris  <rgm@gnu.org>
+
+       * calendar/calendar.el (calendar-basic-setup):
+       Avoid clobbering calendar with diary.  (Bug#18381)
+
 2014-09-05  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * vc/vc-dir.el (vc-dir-update): Don't burp in corner case.
index 57cb488a838929cf41dc10175cb5406984d5b5fd..3fb984525790f9a04e5f4a9021aeed2a7c1ff67a 100644 (file)
@@ -1,7 +1,6 @@
 ;;; calendar.el --- calendar functions
 
-;; Copyright (C) 1988-1995, 1997, 2000-2014 Free Software Foundation,
-;; Inc.
+;; Copyright (C) 1988-1995, 1997, 2000-2014 Free Software Foundation, Inc.
 
 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
 ;; Maintainer: Glenn Morris <rgm@gnu.org>
@@ -1432,7 +1431,12 @@ display the generated calendar."
       (calendar-generate-window month year)
       (if (and calendar-view-diary-initially-flag
                (calendar-date-is-visible-p date))
-          (diary-view-entries))))
+          ;; Do not clobber the calendar with the diary, if the diary
+          ;; has previously been shown in the window that now shows the
+          ;; calendar (bug#18381).
+          (let ((display-buffer-overriding-action
+                 '(nil . ((inhibit-same-window . t)))))
+            (diary-view-entries)))))
   (if calendar-view-holidays-initially-flag
       (let* ((diary-buffer (get-file-buffer diary-file))
              (diary-window (if diary-buffer (get-buffer-window diary-buffer)))