See also `warning-suppress-log-types'."
:type '(repeat (repeat symbol))
:version "22.1")
+
+(defcustom warning-display-at-bottom t
+ "Display the warning buffer at the bottom of the screen.
+The output window will be scrolled to the bottom of the buffer
+to show the last warning message."
+ :type 'boolean
+ :version "30.1")
+
\f
;; The autoload cookie is so that programs can bind this variable
;; safely, testing the existing value, before they call one of the
(or (< (warning-numeric-level level)
(warning-numeric-level warning-minimum-level))
(warning-suppress-p type warning-suppress-types)
- (let ((window (display-buffer buffer)))
+ (let ((window (display-buffer
+ buffer
+ (when warning-display-at-bottom
+ '(display-buffer--maybe-at-bottom
+ (window-height . (lambda (window)
+ (fit-window-to-buffer window 10)))
+ (category . warning))))))
(when (and (markerp warning-series)
(eq (marker-buffer warning-series) buffer))
(set-window-start window warning-series))
+ (when warning-display-at-bottom
+ (with-selected-window window
+ (goto-char (point-max))
+ (set-window-point window (1- (point-max)))
+ (recenter -1)))
(sit-for 0)))))))))
\f
;; Use \\<special-mode-map> so that help-enable-autoload can do its thing.