+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.
(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