mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 11:49:37 +00:00
More fixes related to byte-compilation
This commit is contained in:
parent
34bc31e1d4
commit
9e35dd95d9
1 changed files with 17 additions and 13 deletions
|
@ -427,6 +427,13 @@ possible."
|
||||||
`(diminish (quote ,var))))
|
`(diminish (quote ,var))))
|
||||||
(plist-get args :diminish))))
|
(plist-get args :diminish))))
|
||||||
|
|
||||||
|
(config-body*
|
||||||
|
(and config-body
|
||||||
|
(macroexpand
|
||||||
|
`(use-package-with-elapsed-timer
|
||||||
|
,(format "Configuring package %s" name-string)
|
||||||
|
,@config-body))))
|
||||||
|
|
||||||
(config-defun
|
(config-defun
|
||||||
(make-symbol (concat "use-package--" name-string "--config"))))
|
(make-symbol (concat "use-package--" name-string "--config"))))
|
||||||
|
|
||||||
|
@ -437,8 +444,7 @@ possible."
|
||||||
(list (plist-get args :preface))
|
(list (plist-get args :preface))
|
||||||
|
|
||||||
;; Setup the load-path
|
;; Setup the load-path
|
||||||
(mapcar #'(lambda (path)
|
(mapcar #'(lambda (path) `(add-to-list 'load-path ,path))
|
||||||
`(eval-and-compile (add-to-list 'load-path ,path)))
|
|
||||||
(plist-get args :load-path))
|
(plist-get args :load-path))
|
||||||
|
|
||||||
;; Setup any required autoloads
|
;; Setup any required autoloads
|
||||||
|
@ -461,10 +467,7 @@ possible."
|
||||||
(append (plist-get args :functions) commands)))
|
(append (plist-get args :functions) commands)))
|
||||||
|
|
||||||
;; (if (and defer-loading config-body)
|
;; (if (and defer-loading config-body)
|
||||||
;; `((defun ,config-defun ()
|
;; `((defalias ',config-defun #'(lambda () ,config-body*))))
|
||||||
;; (use-package-with-elapsed-timer
|
|
||||||
;; ,(format "Configuring package %s" name-string)
|
|
||||||
;; ,@config-body))))
|
|
||||||
|
|
||||||
;; The user's initializations
|
;; The user's initializations
|
||||||
(list (use-package-hook-injector name-string :init args))
|
(list (use-package-hook-injector name-string :init args))
|
||||||
|
@ -474,10 +477,8 @@ possible."
|
||||||
bindings
|
bindings
|
||||||
(if config-body
|
(if config-body
|
||||||
`((eval-after-load ',name
|
`((eval-after-load ',name
|
||||||
',(macroexpand
|
;; '(,config-defun)
|
||||||
`(use-package-with-elapsed-timer
|
',config-body*))))
|
||||||
,(format "Configuring package %s" name-string)
|
|
||||||
,@config-body))))))
|
|
||||||
`(,(macroexpand
|
`(,(macroexpand
|
||||||
`(use-package-with-elapsed-timer
|
`(use-package-with-elapsed-timer
|
||||||
,(format "Loading package %s" name-string)
|
,(format "Loading package %s" name-string)
|
||||||
|
@ -486,12 +487,15 @@ possible."
|
||||||
(use-package-cat-maybes
|
(use-package-cat-maybes
|
||||||
(list `(require ',name-symbol))
|
(list `(require ',name-symbol))
|
||||||
bindings
|
bindings
|
||||||
config-body))
|
(list config-body*)))
|
||||||
`(if (not (require ',name-symbol nil t))
|
`(if (not (require ',name-symbol nil t))
|
||||||
(error "Could not load package %s" ,name-string)
|
(display-warning
|
||||||
|
'use-package
|
||||||
|
(format "Could not load package %s" ,name-string)
|
||||||
|
:error)
|
||||||
,@(use-package-cat-maybes
|
,@(use-package-cat-maybes
|
||||||
bindings
|
bindings
|
||||||
config-body))))))))))
|
(list config-body*)))))))))))
|
||||||
|
|
||||||
(defmacro use-package (name &rest args)
|
(defmacro use-package (name &rest args)
|
||||||
"Declare an Emacs package by specifying a group of configuration options.
|
"Declare an Emacs package by specifying a group of configuration options.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue