Commit 6e82d877 authored by Glenn Morris's avatar Glenn Morris

* calendar.el (calendar-basic-setup): Avoid clobbering calendar with diary.

Fixes: debbugs:18381
parent 938aed6e
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.
......
;;; 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)))
......
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