Variable: erc-scrolltobottom-mode-hook

erc-scrolltobottom-mode-hook is a customizable variable defined in erc-goodies.el.gz.

Value

nil

Documentation

Hook run after entering or leaving erc-scrolltobottom-mode(var)/erc-scrolltobottom-mode(fun).

No problems result if this variable is not bound. add-hook automatically binds it. (This is true for all hook variables.)

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)))