aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-16 01:42:08 +0000
committerRichard M. Stallman1994-10-16 01:42:08 +0000
commit95cdbff5459a87a0786c7da3e5919c1f13a5f564 (patch)
tree28439d632b74afc9d5b4271e26b1fcb80dba37b1
parent5bdb0c6d63128c88ddff37cd14baa8ae267348a9 (diff)
downloademacs-95cdbff5459a87a0786c7da3e5919c1f13a5f564.tar.gz
emacs-95cdbff5459a87a0786c7da3e5919c1f13a5f564.zip
(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.
-rw-r--r--lisp/calendar/appt.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index 4bbfe2ca542..24f2259f314 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -385,15 +385,19 @@ Therefore, you need to have `(display-time)' in your .emacs file."
385(defun appt-delete-window () 385(defun appt-delete-window ()
386 "Function called to undisplay appointment messages. 386 "Function called to undisplay appointment messages.
387Usually just deletes the appointment buffer." 387Usually just deletes the appointment buffer."
388 (delete-window (get-buffer-window appt-buffer-name t)) 388 (let ((window (get-buffer-window appt-buffer-name t)))
389 (and window
390 (or (and (fboundp 'frame-root-window)
391 (eq window (frame-root-window (window-frame window))))
392 (delete-window window))))
389 (kill-buffer appt-buffer-name) 393 (kill-buffer appt-buffer-name)
390 (if appt-audible 394 (if appt-audible
391 (beep 1))) 395 (beep 1)))
392 396
393;; Select the lowest window on the frame. 397;; Select the lowest window on the frame.
394(defun appt-select-lowest-window () 398(defun appt-select-lowest-window ()
395 (setq lowest-window (selected-window)) 399 (let* ((lowest-window (selected-window))
396 (let* ((bottom-edge (car (cdr (cdr (cdr (window-edges)))))) 400 (bottom-edge (car (cdr (cdr (cdr (window-edges))))))
397 (last-window (previous-window)) 401 (last-window (previous-window))
398 (window-search t)) 402 (window-search t))
399 (while window-search 403 (while window-search
@@ -440,8 +444,7 @@ The time should be in either 24 hour format or am/pm format."
440 (test-input (y-or-n-p prompt-string))) 444 (test-input (y-or-n-p prompt-string)))
441 (setq tmp-msg-list (cdr tmp-msg-list)) 445 (setq tmp-msg-list (cdr tmp-msg-list))
442 (if test-input 446 (if test-input
443 (setq appt-time-msg-list (delq element appt-time-msg-list))) 447 (setq appt-time-msg-list (delq element appt-time-msg-list)))))
444 (setq tmp-appt-msg-list nil)))
445 (message ""))) 448 (message "")))
446 449
447 450