def-project-type!: fix :build

This commit is contained in:
Henrik Lissner 2016-05-02 15:58:10 -04:00
parent 33ff3e3b3c
commit cbfa794fae

View file

@ -155,10 +155,10 @@ Examples:
(after! company-dict (after! company-dict
(push ',mode company-dict-minor-mode-list)) (push ',mode company-dict-minor-mode-list))
,(when build ,(when build
(when (listp build) (let ((cmd build) file)
(setq build (car-safe (cdr-safe build)))) (when (and (not (functionp build)) (listp build))
(let ((cmd (or (car-safe build) build)) (setq cmd (car-safe (cdr-safe build))
(file (car-safe (cdr-safe build)))) file (cdr-safe (cdr-safe build))))
`(def-builder! ,mode ,cmd ,file))) `(def-builder! ,mode ,cmd ,file)))
,@body ,@body
(remove-hook ',mode-hook-sym ',mode-init-sym)) (remove-hook ',mode-hook-sym ',mode-init-sym))