Mercurial > emacs
changeset 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 | 28cf638a604a |
children | 588363d97121 |
files | lisp/calendar/appt.el |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
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))