This allows use of variables or even arbitrary expressions to construct
use-package arguments:
(use-package some-package
:mode ,mode-spec
:bind (,binding
,@more-bindings
,@(cl-loop for i from ?a to ?z
collect `(,(string i) . nifty-function))))
(plist-keys args)))
(defun plist-get-value (plist prop)
- (let ((value-or-symbol (plist-get plist prop)))
- (if (symbolp value-or-symbol)
- (symbol-value value-or-symbol)
- value-or-symbol)))
+ "Return the value of PROP in PLIST as if it was backquoted."
+ (eval (list '\` (plist-get plist prop))))
(defmacro use-package (name &rest args)
"Use a package with configuration options.