mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 11:49:37 +00:00
Move :ensure option from macro expansion phase to runtime phase
This commit is contained in:
parent
ff8bdfcdca
commit
ac47f783da
1 changed files with 5 additions and 7 deletions
|
@ -463,13 +463,11 @@ manually updated package."
|
|||
|
||||
(defun use-package-handler/:ensure (name keyword ensure rest state)
|
||||
(let ((body (use-package-process-keywords name rest state)))
|
||||
;; This happens at macro expansion time, not when the expanded code is
|
||||
;; compiled or evaluated.
|
||||
(let ((package-name (or (and (eq ensure t) (use-package-as-symbol name)) ensure)))
|
||||
(when package-name
|
||||
(require 'package)
|
||||
(use-package-ensure-elpa package-name)))
|
||||
body))
|
||||
`((let ((package-name (or (and (eq ,ensure t) (use-package-as-symbol ',name)) ,ensure)))
|
||||
(when package-name
|
||||
(require 'package)
|
||||
(use-package-ensure-elpa package-name)))
|
||||
,@body)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue