From: Noam Postavsky Date: Thu, 26 Sep 2013 02:24:45 +0000 (-0400) Subject: plist-get-value treats arg as backquoted X-Git-Tag: emacs-29.0.90~1306^2~15^2~439^2~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=dd20db220d;p=emacs.git 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)))) --- 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.