From: Oleh Krehel Date: Mon, 22 Feb 2016 13:43:23 +0000 (+0100) Subject: lisp/calendar/appt.el (appt-delete-window): Check if buffer is live X-Git-Tag: emacs-26.0.90~2515 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=23d463d40cca1b68ef4f74a303b748e0649c506c;p=emacs.git lisp/calendar/appt.el (appt-delete-window): Check if buffer is live * lisp/calendar/appt.el (appt-delete-window): Avoid trying to delete a non-existing buffer. --- diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index fff63d3b15c..36ebd2d8812 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el @@ -482,7 +482,9 @@ Usually just deletes the appointment buffer." (and window (or (eq window (frame-root-window (window-frame window))) (delete-window window)))) - (kill-buffer appt-buffer-name) + (let ((buffer (get-buffer appt-buffer-name))) + (when buffer + (kill-buffer buffer))) (if appt-audible (beep 1)))