Commit a291c1b7 authored by Glenn Morris's avatar Glenn Morris
Browse files

(appt-disp-window): Do not split small windows.

Suggested by Jeff Miller <>.
parent 1ed5afd9
......@@ -233,8 +233,8 @@ The variable `appt-audible' controls the audible reminder."
;; 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))
(cond ((eq appt-display-format 'window)
(funcall appt-disp-window-function
......@@ -457,7 +457,9 @@ NEW-TIME is a string giving the date."
(same-window-p (buffer-name appt-disp-buf)))
;; By default, split the bottom window and use the lower part.
(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))
(format " Appointment in %s minutes. %s " min-to-app new-time))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment