Other minor improvements for byte-compiling

This commit is contained in:
John Wiegley 2015-03-17 11:50:25 -05:00
parent d2679595fa
commit 46435d7b84

View file

@ -480,7 +480,7 @@ ARGS is a list of forms, so `((foo))' if only `foo' is being called."
(when (bound-and-true-p byte-compile-current-file) (when (bound-and-true-p byte-compile-current-file)
(mapcar #'(lambda (fn) `(declare-function ,fn ,name-string)) (mapcar #'(lambda (fn) `(declare-function ,fn ,name-string))
(append (plist-get args :functions) commands))) (plist-get args :functions)))
;; (if (and defer-loading config-body) ;; (if (and defer-loading config-body)
;; `((defalias ',config-defun #'(lambda () ,config-body*)))) ;; `((defalias ',config-defun #'(lambda () ,config-body*))))
@ -594,13 +594,12 @@ this file. Usage:
(requires (plist-get args* :requires)) (requires (plist-get args* :requires))
(body* (body*
(use-package-progn (use-package-progn
(use-package-expand "use-package" "expansion"
(if (null requires) (if (null requires)
expansion expansion
`((if ,(if (listp requires) `((if ,(if (listp requires)
`(not (member nil (mapcar #'featurep ',requires))) `(not (member nil (mapcar #'featurep ',requires)))
`(featurep ',requires)) `(featurep ',requires))
,@expansion))))))) ,@expansion))))))
;; (message "Expanded: %s" (pp-to-string body*)) ;; (message "Expanded: %s" (pp-to-string body*))
body*)))) body*))))