(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)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;