From 38023020788a342bbe71ebbf30c3b4d1fd8c4155 Mon Sep 17 00:00:00 2001 From: "Edward M. Reingold" Date: Mon, 11 May 1998 15:48:24 +0000 Subject: [PATCH] On exiting, don't signal error when user changes mind. --- lisp/calendar/calendar.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 65e2ace68fc..10498e5b088 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -2096,11 +2096,10 @@ the STRINGS are just concatenated and the result truncated." "Get out of the calendar window and hide it and related buffers." (interactive) (let* ((diary-buffer (get-file-buffer diary-file))) - (if (and diary-buffer (buffer-modified-p diary-buffer) - (not - (yes-or-no-p - "Diary modified; do you really want to exit the calendar? "))) - (beep) + (if (or (not diary-buffer) + (not (buffer-modified-p diary-buffer)) + (yes-or-no-p + "Diary modified; do you really want to exit the calendar? ")) ;; Need to do this multiple times because one time can replace some ;; calendar-related buffers with other calendar-related buffers (mapcar (lambda (x) -- 2.39.2