Mercurial > emacs
changeset 9551:ac21ac5e8c69
(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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 16 Oct 1994 01:42:08 +0000 |
parents | 5b91f8657de6 |
children | c1d477aec340 |
files | lisp/calendar/appt.el |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calendar/appt.el Sun Oct 16 01:40:38 1994 +0000 +++ b/lisp/calendar/appt.el Sun Oct 16 01:42:08 1994 +0000 @@ -385,15 +385,19 @@ (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 @@ (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 "")))