For :post-init single-funcall case, also allow macros and other callables

This commit is contained in:
Ryan C. Thompson 2012-02-20 00:44:50 -08:00
parent fe2916e05c
commit b52326c065

View File

@ -364,8 +364,9 @@ which defaults to the first element in `el-get-recipe-path'."
;; A list is either a single function-call or a list of
;; expressions. Either way, it gets wrapped into a function.
((listp func)
(if (functionp (car func))
;; Single function call
(if (or (functionp (car func))
(symbol-function (car func)))
;; Single function (or macro, or whatever) call
(append (lambda ()) (list func))
;; List of expressions
(append '(lambda ()) func)))