From 6e82d877a4a59feb4390baeb2ccc57e7cd03593d Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 7 Sep 2014 22:57:24 -0700 Subject: [PATCH] * calendar.el (calendar-basic-setup): Avoid clobbering calendar with diary. Fixes: debbugs:18381 --- lisp/ChangeLog | 5 +++++ lisp/calendar/calendar.el | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 504657358f1..2bd234e12e0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-09-08 Glenn Morris + + * calendar/calendar.el (calendar-basic-setup): + Avoid clobbering calendar with diary. (Bug#18381) + 2014-09-05 Stefan Monnier * vc/vc-dir.el (vc-dir-update): Don't burp in corner case. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 57cb488a838..3fb98452579 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -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 ;; Maintainer: Glenn Morris @@ -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))) -- 2.11.4.GIT