branch: externals/transient commit e88f51d6922b652b9ccb8a786c57ef3475439a94 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
Quote more carefully while parsing --- lisp/transient.el | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/lisp/transient.el b/lisp/transient.el index b8371d9619..5af5e7bd31 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -1049,10 +1049,10 @@ example, sets a variable use `transient-define-infix' instead. (let ((key pop) (val pop)) (cond ((eq key :class) - (setq class (list 'quote val))) + (setq class (macroexp-quote val))) ((or (symbolp val) (and (listp val) (not (eq (car val) 'lambda)))) - (setq args (plist-put args key (list 'quote val)))) + (setq args (plist-put args key (macroexp-quote val)))) ((setq args (plist-put args key val)))))) (list 'vector (or level transient--default-child-level) @@ -1082,12 +1082,12 @@ example, sets a variable use `transient-define-infix' instead. ((and (symbolp car) (not (commandp car)) (commandp (cadr spec))) - (setq args (plist-put args :description (list 'quote pop))))) + (setq args (plist-put args :description (macroexp-quote pop))))) (cond ((keywordp car) (error "Need command, got %S" car)) ((symbolp car) - (setq args (plist-put args :command (list 'quote pop)))) + (setq args (plist-put args :command (macroexp-quote pop)))) ((and (commandp car) (not (stringp car))) (let ((cmd pop) @@ -1096,7 +1096,7 @@ example, sets a variable use `transient-define-infix' instead. (or (plist-get args :description) (plist-get args :key)))))) (defalias sym cmd) - (setq args (plist-put args :command (list 'quote sym))))) + (setq args (plist-put args :command (macroexp-quote sym))))) ((or (stringp car) (and car (listp car))) (let ((arg pop)) @@ -1114,10 +1114,7 @@ example, sets a variable use `transient-define-infix' instead. prefix arg))))) (cond ((and car (not (keywordp car))) (setq class 'transient-option) - (setq args (plist-put args :reader - (if (symbolp car) - (list 'quote pop) - pop)))) + (setq args (plist-put args :reader (macroexp-quote pop)))) ((not (string-suffix-p "=" arg)) (setq class 'transient-switch)) (t @@ -1127,20 +1124,20 @@ example, sets a variable use `transient-define-infix' instead. (while (keywordp car) (let ((key pop) (val pop)) - (cond ((eq key :class) (setq class (list 'quote val))) + (cond ((eq key :class) (setq class val)) ((eq key :level) (setq level val)) ((eq (car-safe val) '\,) (setq args (plist-put args key (cadr val)))) ((or (symbolp val) (and (listp val) (not (eq (car val) 'lambda)))) - (setq args (plist-put args key (list 'quote val)))) + (setq args (plist-put args key (macroexp-quote val)))) ((setq args (plist-put args key val))))))) (unless (plist-get args :key) (when-let ((shortarg (plist-get args :shortarg))) (setq args (plist-put args :key shortarg)))) (list 'list (or level transient--default-child-level) - (list 'quote (or class 'transient-suffix)) + (macroexp-quote (or class 'transient-suffix)) (cons 'list args)))) (defun transient--default-infix-command ()