# HG changeset patch # User Glenn Morris # Date 1176518218 0 # Node ID 2b47f00a7c16c0c7c47a53b4b23fa46c796e3d8c # Parent 28cf638a604a924dccfc8350ec3197e9b385de7a (appt-disp-window): Do not split small windows. Suggested by Jeff Miller . diff -r 28cf638a604a -r 2b47f00a7c16 lisp/calendar/appt.el --- a/lisp/calendar/appt.el Sat Apr 14 02:36:44 2007 +0000 +++ b/lisp/calendar/appt.el Sat Apr 14 02:36:58 2007 +0000 @@ -233,8 +233,8 @@ ;; vars appt-msg-window and appt-visible are dropped. (let ((appt-display-format (if (eq appt-display-format 'ignore) - (cond (appt-msg-window 'window) - (appt-visible 'echo)) + (cond (appt-msg-window 'window) + (appt-visible 'echo)) appt-display-format))) (cond ((eq appt-display-format 'window) (funcall appt-disp-window-function @@ -457,7 +457,9 @@ (same-window-p (buffer-name appt-disp-buf))) ;; By default, split the bottom window and use the lower part. (appt-select-lowest-window) - (select-window (split-window))) + ;; Split the window, unless it's too small to do so. + (when (>= (window-height) (* 2 window-min-height)) + (select-window (split-window)))) (switch-to-buffer appt-disp-buf)) (calendar-set-mode-line (format " Appointment in %s minutes. %s " min-to-app new-time))