Mercurial > emacs
diff lisp/calendar/appt.el @ 77192:2b47f00a7c16
(appt-disp-window): Do not split small windows.
Suggested by Jeff Miller <jmiller@cablespeed.com>.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 14 Apr 2007 02:36:58 +0000 |
parents | 7a3f13e2dd57 |
children | 93e11478c954 e6fdae9180d4 |
line wrap: on
line diff
--- 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))