aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-09 09:19:16 +0000
committerRichard M. Stallman1994-10-09 09:19:16 +0000
commitd5b22d8895eefbcb22eb67c3a2333f9872160260 (patch)
tree2abb2f64466309d4b8e95f6db74646195e7c2b16
parentf4faa47c569dd7b5105a139c7fff343a34f559b9 (diff)
downloademacs-d5b22d8895eefbcb22eb67c3a2333f9872160260.tar.gz
emacs-d5b22d8895eefbcb22eb67c3a2333f9872160260.zip
(appt-delete-window): Look on all frames for the window.
(appt-disp-window): If frame is unsplittable, use display-buffer.
-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 98e555fed13..4bbfe2ca542 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -366,14 +366,17 @@ Therefore, you need to have `(display-time)' in your .emacs file."
366 (appt-disp-buf (set-buffer (get-buffer-create appt-buffer-name)))) 366 (appt-disp-buf (set-buffer (get-buffer-create appt-buffer-name))))
367 367
368 (appt-select-lowest-window) 368 (appt-select-lowest-window)
369 (split-window) 369 (if (cdr (assq 'unsplittable (frame-parameters)))
370 370 ;; In an unsplittable frame, use something somewhere else.
371 (pop-to-buffer appt-disp-buf) 371 (display-buffer appt-disp-buf)
372 ;; Otherwise, split the bottom window and use the lower part.
373 (split-window)
374 (pop-to-buffer appt-disp-buf))
372 (setq mode-line-format 375 (setq mode-line-format
373 (concat "-------------------- Appointment in " 376 (concat "-------------------- Appointment in "
374 min-to-app " minutes. " new-time " %-")) 377 min-to-app " minutes. " new-time " %-"))
375 (insert-string appt-msg) 378 (insert-string appt-msg)
376 (shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf)) 379 (shrink-window-if-larger-than-buffer (get-buffer-window appt-disp-buf t))
377 (set-buffer-modified-p nil) 380 (set-buffer-modified-p nil)
378 (select-window this-window) 381 (select-window this-window)
379 (if appt-audible 382 (if appt-audible
@@ -382,7 +385,7 @@ Therefore, you need to have `(display-time)' in your .emacs file."
382(defun appt-delete-window () 385(defun appt-delete-window ()
383 "Function called to undisplay appointment messages. 386 "Function called to undisplay appointment messages.
384Usually just deletes the appointment buffer." 387Usually just deletes the appointment buffer."
385 (delete-window (get-buffer-window appt-buffer-name)) 388 (delete-window (get-buffer-window appt-buffer-name t))
386 (kill-buffer appt-buffer-name) 389 (kill-buffer appt-buffer-name)
387 (if appt-audible 390 (if appt-audible
388 (beep 1))) 391 (beep 1)))