~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd8d9a6
)
dot/ercrc.el: Avoid duplicates in `mdw-erc-auto-greet-bots-alist'.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 5 Jan 2014 13:12:19 +0000
(13:12 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 5 Jan 2014 13:26:37 +0000
(13:26 +0000)
Use `pushnew' instead of `push' here. Otherwise we end up greeting bots
multiple times.
dot/ercrc.el
patch
|
blob
|
blame
|
history
diff --git
a/dot/ercrc.el
b/dot/ercrc.el
index
525368d
..
cdf436e
100644
(file)
--- a/
dot/ercrc.el
+++ b/
dot/ercrc.el
@@
-44,7
+44,8
@@
matches SERVER-REGEXP.")
(defun mdw-define-bot-greeting (server bot greeting)
"Define a new bot greeting."
- (push (list server bot greeting) mdw-erc-auto-greet-bots-alist))
+ (pushnew (list server bot greeting) mdw-erc-auto-greet-bots-alist
+ :test #'string= :key #'car))
(load "~/.erc-auth.el")
(defun mdw-erc-auto-greet-bots (server nick)