Function: erc-scrolltobottom-mode
erc-scrolltobottom-mode is an autoloaded, interactive and
byte-compiled function defined in erc-goodies.el.gz.
Signature
(erc-scrolltobottom-mode &optional ARG)
Documentation
Toggle ERC scrolltobottom mode.
If called interactively, enable erc-scrolltobottom-mode(var)/erc-scrolltobottom-mode(fun) if ARG
is positive, and disable it otherwise. If called from Lisp,
enable the mode if ARG is omitted or nil.
This mode causes the prompt to stay at the end of the window.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-goodies.el.gz
;;;###autoload(autoload 'erc-scrolltobottom-mode "erc-goodies" nil t)
(define-erc-module scrolltobottom nil
"This mode causes the prompt to stay at the end of the window."
((add-hook 'erc-mode-hook #'erc--scrolltobottom-setup)
(when (and erc-scrolltobottom-all (< emacs-major-version 28))
(erc-button--display-error-notice-with-keys
"Option `erc-scrolltobottom-all' requires Emacs 28+. Disabling.")
(setq erc-scrolltobottom-all nil))
(unless erc--updating-modules-p (erc-buffer-do #'erc--scrolltobottom-setup))
(if erc-scrolltobottom-all
(progn
(add-hook 'erc-insert-pre-hook #'erc--scrolltobottom-on-pre-insert 25)
(add-hook 'erc-pre-send-functions #'erc--scrolltobottom-on-pre-insert)
(add-hook 'erc-insert-done-hook #'erc--scrolltobottom-all)
(add-hook 'erc-send-completed-hook #'erc--scrolltobottom-all))
(add-hook 'erc-insert-done-hook #'erc-possibly-scroll-to-bottom)))
((remove-hook 'erc-mode-hook #'erc--scrolltobottom-setup)
(erc-buffer-do #'erc--scrolltobottom-setup)
(remove-hook 'erc-insert-pre-hook #'erc--scrolltobottom-on-pre-insert)
(remove-hook 'erc-send-completed-hook #'erc--scrolltobottom-all)
(remove-hook 'erc-insert-done-hook #'erc--scrolltobottom-all)
(remove-hook 'erc-pre-send-functions #'erc--scrolltobottom-on-pre-insert)
(remove-hook 'erc-insert-done-hook #'erc-possibly-scroll-to-bottom)))