aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-08-30 22:45:10 +0000
committerRichard M. Stallman1994-08-30 22:45:10 +0000
commit58af3a0a8142005f9f0352fe5c57a6ee2c393ba7 (patch)
tree559c18e6af903d8d106fa846e7358334bad6a862
parent7e846b1092ed94a83f4891279edc4e16f36f2fe1 (diff)
downloademacs-58af3a0a8142005f9f0352fe5c57a6ee2c393ba7.tar.gz
emacs-58af3a0a8142005f9f0352fe5c57a6ee2c393ba7.zip
(exit-calendar): Don't restore window config.
(calendar): Don't save one.
-rw-r--r--lisp/calendar/calendar.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 103fd2acf67..7d9550d3dc4 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1143,7 +1143,7 @@ to be replaced by asterisks to highlight it whenever it is in the window."
1143 (interactive "P") 1143 (interactive "P")
1144 (set-buffer (get-buffer-create calendar-buffer)) 1144 (set-buffer (get-buffer-create calendar-buffer))
1145 (calendar-mode) 1145 (calendar-mode)
1146 (setq calendar-window-configuration (current-window-configuration)) 1146;;; (setq calendar-window-configuration (current-window-configuration))
1147 (let* ((completion-ignore-case t) 1147 (let* ((completion-ignore-case t)
1148 (pop-up-windows t) 1148 (pop-up-windows t)
1149 (split-height-threshold 1000) 1149 (split-height-threshold 1000)
@@ -1832,21 +1832,27 @@ concatenated and the result truncated."
1832 calendar-mode-line-format ? (frame-width)))))) 1832 calendar-mode-line-format ? (frame-width))))))
1833 1833
1834(defun exit-calendar () 1834(defun exit-calendar ()
1835 "Get out of the calendar window and bury it and related buffers." 1835 "Delete the calendar window, and bury the calendar and related buffers."
1836 (interactive) 1836 (interactive)
1837 (let ((diary-buffer (get-file-buffer diary-file)) 1837 (let ((diary-buffer (get-file-buffer diary-file))
1838 (d-buffer (get-buffer fancy-diary-buffer)) 1838 (d-buffer (get-buffer fancy-diary-buffer))
1839 (h-buffer (get-buffer holiday-buffer))) 1839 (h-buffer (get-buffer holiday-buffer)))
1840 (if (not diary-buffer) 1840 (if (not diary-buffer)
1841 (progn 1841 (progn
1842 (set-window-configuration calendar-window-configuration) 1842 ;; Restoring the configuration is undesirable because
1843 ;; it restores the value of point in other windows.
1844;;; (set-window-configuration calendar-window-configuration)
1845 (or (one-window-p t)
1846 (delete-window))
1843 (bury-buffer calendar-buffer) 1847 (bury-buffer calendar-buffer)
1844 (if d-buffer (bury-buffer d-buffer)) 1848 (if d-buffer (bury-buffer d-buffer))
1845 (if h-buffer (bury-buffer h-buffer))) 1849 (if h-buffer (bury-buffer h-buffer)))
1846 (if (or (not (buffer-modified-p diary-buffer)) 1850 (if (or (not (buffer-modified-p diary-buffer))
1847 (yes-or-no-p "Diary modified; do you really want to exit the calendar? ")) 1851 (yes-or-no-p "Diary modified; do you really want to exit the calendar? "))
1848 (progn 1852 (progn
1849 (set-window-configuration calendar-window-configuration) 1853;;; (set-window-configuration calendar-window-configuration)
1854 (or (one-window-p t)
1855 (delete-window))
1850 (bury-buffer calendar-buffer) 1856 (bury-buffer calendar-buffer)
1851 (if d-buffer (bury-buffer d-buffer)) 1857 (if d-buffer (bury-buffer d-buffer))
1852 (if h-buffer (bury-buffer h-buffer)) 1858 (if h-buffer (bury-buffer h-buffer))