]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/calendar/appt.el (appt-delete-window): Check if buffer is live
authorOleh Krehel <ohwoeowho@gmail.com>
Mon, 22 Feb 2016 13:43:23 +0000 (14:43 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Mon, 22 Feb 2016 13:45:14 +0000 (14:45 +0100)
* lisp/calendar/appt.el (appt-delete-window): Avoid trying to delete a
  non-existing buffer.

lisp/calendar/appt.el

index fff63d3b15cf82b8369242c84e9534bd92ce59c2..36ebd2d88129f08ebd6d03bf66fa0c82d07fe7f4 100644 (file)
@@ -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)))