[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 d132c7b: erc-backend.el: Give hook-name a default
From: |
Kelvin White |
Subject: |
[Emacs-diffs] emacs-24 d132c7b: erc-backend.el: Give hook-name a default value of nil and add-to-list unconditionally. Fixes debbugs:19363 |
Date: |
Wed, 14 Jan 2015 21:59:17 +0000 |
branch: emacs-24
commit d132c7b6583a62e702bac16e16d714fb0674934e
Author: Dima Kogan <address@hidden>
Commit: kwhite <address@hidden>
erc-backend.el: Give hook-name a default value of nil and add-to-list
unconditionally. Fixes debbugs:19363
---
lisp/erc/ChangeLog | 5 +++++
lisp/erc/erc-backend.el | 7 +++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 8c8a3bf..8e0c31a 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-14 Dima Kogan <address@hidden>
+
+ * 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 <address@hidden>
* erc-stamp.el (erc-timestamp-intangible): Change version tag to 24.5.
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index b8c6786..8ce199f 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 d132c7b: erc-backend.el: Give hook-name a default value of nil and add-to-list unconditionally. Fixes debbugs:19363,
Kelvin White <=