Mercurial > emacs
comparison lisp/calendar/calendar.el @ 22028:639be14b80ef
On exiting, don't signal error when user changes mind.
author | Edward M. Reingold <reingold@emr.cs.iit.edu> |
---|---|
date | Mon, 11 May 1998 15:48:24 +0000 |
parents | aca7f8a34a9e |
children | 329f546a73ec |
comparison
equal
deleted
inserted
replaced
22027:aca7f8a34a9e | 22028:639be14b80ef |
---|---|
2094 | 2094 |
2095 (defun exit-calendar () | 2095 (defun exit-calendar () |
2096 "Get out of the calendar window and hide it and related buffers." | 2096 "Get out of the calendar window and hide it and related buffers." |
2097 (interactive) | 2097 (interactive) |
2098 (let* ((diary-buffer (get-file-buffer diary-file))) | 2098 (let* ((diary-buffer (get-file-buffer diary-file))) |
2099 (if (and diary-buffer (buffer-modified-p diary-buffer) | 2099 (if (or (not diary-buffer) |
2100 (not | 2100 (not (buffer-modified-p diary-buffer)) |
2101 (yes-or-no-p | 2101 (yes-or-no-p |
2102 "Diary modified; do you really want to exit the calendar? "))) | 2102 "Diary modified; do you really want to exit the calendar? ")) |
2103 (beep) | |
2104 ;; Need to do this multiple times because one time can replace some | 2103 ;; Need to do this multiple times because one time can replace some |
2105 ;; calendar-related buffers with other calendar-related buffers | 2104 ;; calendar-related buffers with other calendar-related buffers |
2106 (mapcar (lambda (x) | 2105 (mapcar (lambda (x) |
2107 (mapcar 'calendar-hide-window (calendar-window-list))) | 2106 (mapcar 'calendar-hide-window (calendar-window-list))) |
2108 (calendar-window-list))))) | 2107 (calendar-window-list))))) |