Commit d132c7b6 authored by Dima Kogan's avatar Dima Kogan Committed by kwhite

erc-backend.el: Give hook-name a default value of nil and add-to-list...

erc-backend.el: Give hook-name a default value of nil and add-to-list unconditionally. Fixes debbugs:19363
parent 61cc7bf8
2015-01-14 Dima Kogan <dima@secretsauce.net>
* erc-backend.el (define-erc-response-handler): Give hook-name
default value of nil and add-to-list (bug#19363)
2014-11-10 Kelvin White <kwhite@gnu.org>
* erc-stamp.el (erc-timestamp-intangible): Change version tag to 24.5.
......
......@@ -1162,8 +1162,11 @@ add things to `%s' instead."
(cl-loop for alias in aliases
collect (intern (format "erc-server-%s-functions" alias)))))
`(prog2
;; Normal hook variable.
(defvar ,hook-name ',fn-name ,(format hook-doc name))
;; Normal hook variable. The variable may already have a
;; value at this point, so I default to nil, and (add-hook)
;; unconditionally
(defvar ,hook-name nil ,(format hook-doc name))
(add-to-list ',hook-name ',fn-name)
;; Handler function
(defun ,fn-name (proc parsed)
,fn-doc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment