diff lisp/calendar/calendar.el @ 8671:34db69f96583

(exit-calendar): Don't restore window config. (calendar): Don't save one.
author Richard M. Stallman <rms@gnu.org>
date Tue, 30 Aug 1994 22:45:10 +0000
parents 676fd590cc41
children c40de6b1b4f9
line wrap: on
line diff
--- a/lisp/calendar/calendar.el	Tue Aug 30 21:20:09 1994 +0000
+++ b/lisp/calendar/calendar.el	Tue Aug 30 22:45:10 1994 +0000
@@ -1143,7 +1143,7 @@
   (interactive "P")
   (set-buffer (get-buffer-create calendar-buffer))
   (calendar-mode)
-  (setq calendar-window-configuration (current-window-configuration))
+;;;  (setq calendar-window-configuration (current-window-configuration))
   (let* ((completion-ignore-case t)
          (pop-up-windows t)
          (split-height-threshold 1000)
@@ -1832,21 +1832,27 @@
                calendar-mode-line-format ?  (frame-width))))))
 
 (defun exit-calendar ()
-  "Get out of the calendar window and bury it and related buffers."
+  "Delete the calendar window, and bury the calendar and related buffers."
   (interactive)
   (let ((diary-buffer (get-file-buffer diary-file))
         (d-buffer (get-buffer fancy-diary-buffer))
         (h-buffer (get-buffer holiday-buffer)))
     (if (not diary-buffer)
         (progn
-          (set-window-configuration calendar-window-configuration)
+	  ;; Restoring the configuration is undesirable because
+	  ;; it restores the value of point in other windows.
+;;;          (set-window-configuration calendar-window-configuration)
+	  (or (one-window-p t)
+	      (delete-window))
           (bury-buffer calendar-buffer)
           (if d-buffer (bury-buffer d-buffer))
           (if h-buffer (bury-buffer h-buffer)))
       (if (or (not (buffer-modified-p diary-buffer))
               (yes-or-no-p "Diary modified; do you really want to exit the calendar? "))
           (progn
-            (set-window-configuration calendar-window-configuration)
+;;;            (set-window-configuration calendar-window-configuration)
+	    (or (one-window-p t)
+		(delete-window))
             (bury-buffer calendar-buffer)
             (if d-buffer (bury-buffer d-buffer))
             (if h-buffer (bury-buffer h-buffer))