Function: comint-postoutput-scroll-to-bottom

comint-postoutput-scroll-to-bottom is a byte-compiled function defined in comint.el.gz.

Signature

(comint-postoutput-scroll-to-bottom STRING)

Documentation

Go to the end of buffer in some or all windows showing it.

Do not scroll if the current line is the last line in the buffer. Depends on the value of comint-move-point-for-output and comint-scroll-show-maximum-output.

This function should be in the list comint-output-filter-functions.

Source Code

;; Defined in /usr/src/emacs/lisp/comint.el.gz
(defun comint-postoutput-scroll-to-bottom (_string)
  "Go to the end of buffer in some or all windows showing it.
Do not scroll if the current line is the last line in the buffer.
Depends on the value of `comint-move-point-for-output' and
`comint-scroll-show-maximum-output'.

This function should be in the list `comint-output-filter-functions'."
  (let* ((current (current-buffer))
	 (process (get-buffer-process current)))
    (unwind-protect
	(cond
	 ((null process))
	 ((bound-and-true-p follow-mode)
	  (follow-comint-scroll-to-bottom))
	 (t
          (dolist (w (get-buffer-window-list current nil t))
            (comint-adjust-window-point w process)
            ;; Optionally scroll to the bottom of the window.
            (and comint-scroll-show-maximum-output
                 (eq (window-point w) (point-max))
                 (with-selected-window w
                   (recenter (- -1 scroll-margin)))))))
      (set-buffer current))))