aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2007-04-14 02:36:58 +0000
committerGlenn Morris2007-04-14 02:36:58 +0000
commita291c1b7524f214461d3b020657913aed908e820 (patch)
treefb57249d3c50799ee66df37fd47a198576c521bd
parent1ed5afd9e4c7bc19541700301d1969647ab54423 (diff)
downloademacs-a291c1b7524f214461d3b020657913aed908e820.tar.gz
emacs-a291c1b7524f214461d3b020657913aed908e820.zip
(appt-disp-window): Do not split small windows.
Suggested by Jeff Miller <jmiller@cablespeed.com>.
-rw-r--r--lisp/calendar/appt.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index 82fa0e66dbf..02865c994e3 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -233,8 +233,8 @@ The variable `appt-audible' controls the audible reminder."
233 ;; vars appt-msg-window and appt-visible are dropped. 233 ;; vars appt-msg-window and appt-visible are dropped.
234 (let ((appt-display-format 234 (let ((appt-display-format
235 (if (eq appt-display-format 'ignore) 235 (if (eq appt-display-format 'ignore)
236 (cond (appt-msg-window 'window) 236 (cond (appt-msg-window 'window)
237 (appt-visible 'echo)) 237 (appt-visible 'echo))
238 appt-display-format))) 238 appt-display-format)))
239 (cond ((eq appt-display-format 'window) 239 (cond ((eq appt-display-format 'window)
240 (funcall appt-disp-window-function 240 (funcall appt-disp-window-function
@@ -457,7 +457,9 @@ NEW-TIME is a string giving the date."
457 (same-window-p (buffer-name appt-disp-buf))) 457 (same-window-p (buffer-name appt-disp-buf)))
458 ;; By default, split the bottom window and use the lower part. 458 ;; By default, split the bottom window and use the lower part.
459 (appt-select-lowest-window) 459 (appt-select-lowest-window)
460 (select-window (split-window))) 460 ;; Split the window, unless it's too small to do so.
461 (when (>= (window-height) (* 2 window-min-height))
462 (select-window (split-window))))
461 (switch-to-buffer appt-disp-buf)) 463 (switch-to-buffer appt-disp-buf))
462 (calendar-set-mode-line 464 (calendar-set-mode-line
463 (format " Appointment in %s minutes. %s " min-to-app new-time)) 465 (format " Appointment in %s minutes. %s " min-to-app new-time))