[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114340: * subr.el (add-hook): Robustify to handle c
From: |
Leo Liu |
Subject: |
[Emacs-diffs] trunk r114340: * subr.el (add-hook): Robustify to handle closure as well. |
Date: |
Wed, 18 Sep 2013 01:28:16 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114340
revision-id: address@hidden
parent: address@hidden
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Wed 2013-09-18 09:27:00 +0800
message:
* subr.el (add-hook): Robustify to handle closure as well.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/subr.el subr.el-20091113204419-o5vbwnq5f7feedwu-151
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-09-17 20:27:10 +0000
+++ b/lisp/ChangeLog 2013-09-18 01:27:00 +0000
@@ -1,3 +1,7 @@
+2013-09-18 Leo Liu <address@hidden>
+
+ * subr.el (add-hook): Robustify to handle closure as well.
+
2013-09-17 Glenn Morris <address@hidden>
* simple.el (messages-buffer-mode-map): Unbind "g".
=== modified file 'lisp/subr.el'
--- a/lisp/subr.el 2013-09-17 07:26:07 +0000
+++ b/lisp/subr.el 2013-09-18 01:27:00 +0000
@@ -1366,7 +1366,7 @@
(setq local t)))
(let ((hook-value (if local (symbol-value hook) (default-value hook))))
;; If the hook value is a single function, turn it into a list.
- (when (or (not (listp hook-value)) (eq (car hook-value) 'lambda))
+ (when (or (not (listp hook-value)) (functionp hook-value))
(setq hook-value (list hook-value)))
;; Do the actual addition if necessary
(unless (member function hook-value)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114340: * subr.el (add-hook): Robustify to handle closure as well.,
Leo Liu <=