"This mode distinguishes non-commands.
Commands listed in `erc-insert-this' know how to display
themselves."
- ((cl-pushnew 'erc-send-distinguish-noncommands erc-pre-send-functions))
- ((setq erc-pre-send-functions (delq 'erc-send-distinguish-noncommands
- erc-pre-send-functions))))
+ ((add-hook 'erc-pre-send-functions 'erc-send-distinguish-noncommands))
+ ((remove-hook 'erc-pre-send-functions 'erc-send-distinguish-noncommands)))
(defun erc-send-distinguish-noncommands (state)
"If STR is an ERC non-command, set `insertp' in STATE to nil."
(define-erc-module ring nil
"Stores input in a ring so that previous commands and messages can
be recalled using M-p and M-n."
- ((cl-pushnew 'erc-add-to-input-ring erc-pre-send-functions)
+ ((add-hook 'erc-pre-send-functions 'erc-add-to-input-ring)
(define-key erc-mode-map "\M-p" 'erc-previous-command)
(define-key erc-mode-map "\M-n" 'erc-next-command))
- ((setq erc-pre-send-functions (delq 'erc-add-to-input-ring
- erc-pre-send-functions))
+ ((remove-hook 'erc-pre-send-functions 'erc-add-to-input-ring)
(define-key erc-mode-map "\M-p" 'undefined)
(define-key erc-mode-map "\M-n" 'undefined)))