Function: erc-scrolltobottom-disable

erc-scrolltobottom-disable is an interactive and byte-compiled function defined in erc-goodies.el.gz.

Signature

(erc-scrolltobottom-disable)

Documentation

Disable ERC scrolltobottom mode.

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
         (remove-hook 'erc-insert-done-hook #'erc-possibly-scroll-to-bottom)
         (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))
     (remove-hook 'erc-insert-pre-hook #'erc--scrolltobottom-on-pre-insert)
     (remove-hook 'erc-pre-send-functions #'erc--scrolltobottom-on-pre-insert)
     (remove-hook 'erc-insert-done-hook #'erc--scrolltobottom-all)
     (remove-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)))