From dd20db220dd3273d595f98a3fb0c541d1d91f74d Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 25 Sep 2013 22:24:45 -0400 Subject: [PATCH] plist-get-value treats arg as backquoted 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)))) --- lisp/use-package/use-package.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 68270657a9b..e1ba6e28c09 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -439,10 +439,8 @@ Return the list of recognized keywords." (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. -- 2.39.2