+2013-09-18 Leo Liu <sdl.web@gmail.com>
+
+ * subr.el (add-hook): Robustify to handle closure as well.
+
2013-09-17 Glenn Morris <rgm@gnu.org>
* simple.el (messages-buffer-mode-map): Unbind "g".
(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)