]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't have erc-goodies and erc-ring register functions multiple times
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 19 Jun 2019 14:42:02 +0000 (16:42 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 19 Jun 2019 15:07:41 +0000 (17:07 +0200)
* lisp/erc/erc-goodies.el (noncommands): Don't register functions
twice.

* lisp/erc/erc-ring.el (ring): Ditto.

lisp/erc/erc-goodies.el
lisp/erc/erc-ring.el

index 41083829baceaaf6cf1b6399ee498142c4e2354f..ff5539e7928bc520d681b3ce145133e339d111c8 100644 (file)
@@ -177,7 +177,7 @@ does not appear in the ERC buffer after the user presses ENTER.")
   "This mode distinguishes non-commands.
 Commands listed in `erc-insert-this' know how to display
 themselves."
-  ((push 'erc-send-distinguish-noncommands erc-pre-send-functions))
+  ((cl-pushnew 'erc-send-distinguish-noncommands erc-pre-send-functions))
   ((setq erc-pre-send-functions (delq 'erc-send-distinguish-noncommands
                                       erc-pre-send-functions))))
 
index 2ee78f4d46d0e18076cc452b0be17c9608758586..aaf4bd8c499c99b1a1c577fe5905488fc657996c 100644 (file)
@@ -46,7 +46,7 @@
 (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."
-  ((push 'erc-add-to-input-ring erc-pre-send-functions)
+  ((cl-pushnew 'erc-add-to-input-ring erc-pre-send-functions)
    (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