Commit 95cdbff5 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(appt-select-lowest-window): Locally bind lowest-window.

(appt-delete): Don't set tmp-appt-msg-list.

(appt-delete-window): Avoid error if WINDOW is nil.

(appt-delete-window): Do nothing if the window
is the only one in its frame.
parent 5bdb0c6d
......@@ -385,15 +385,19 @@ Therefore, you need to have `(display-time)' in your .emacs file."
(defun appt-delete-window ()
"Function called to undisplay appointment messages.
Usually just deletes the appointment buffer."
(delete-window (get-buffer-window appt-buffer-name t))
(let ((window (get-buffer-window appt-buffer-name t)))
(and window
(or (and (fboundp 'frame-root-window)
(eq window (frame-root-window (window-frame window))))
(delete-window window))))
(kill-buffer appt-buffer-name)
(if appt-audible
(beep 1)))
;; Select the lowest window on the frame.
(defun appt-select-lowest-window ()
(setq lowest-window (selected-window))
(let* ((bottom-edge (car (cdr (cdr (cdr (window-edges))))))
(let* ((lowest-window (selected-window))
(bottom-edge (car (cdr (cdr (cdr (window-edges))))))
(last-window (previous-window))
(window-search t))
(while window-search
......@@ -440,8 +444,7 @@ The time should be in either 24 hour format or am/pm format."
(test-input (y-or-n-p prompt-string)))
(setq tmp-msg-list (cdr tmp-msg-list))
(if test-input
(setq appt-time-msg-list (delq element appt-time-msg-list)))
(setq tmp-appt-msg-list nil)))
(setq appt-time-msg-list (delq element appt-time-msg-list)))))
(message "")))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment