diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2025-05-16 09:40:59 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2025-05-16 09:40:59 +0200 |
| commit | 70791e2c97f6422568ca6a3398be844a905dfabc (patch) | |
| tree | aaedf86f2994ee0dbedc83b8d147a1ea8acb90b4 | |
| parent | bcc0bf836808e156262d9ff631be7d91a0ec201d (diff) | |
Prefer quoting top-level included groups
That's only natural, given that the group vectors are self-quoting,
while the values in the preceding property list are evaluated. For
backward compatibility the quoting is optional, for now at least.
| -rw-r--r-- | lisp/transient.el | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lisp/transient.el b/lisp/transient.el index cc6b2b8..6eb7419 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -1255,10 +1255,19 @@ commands are aliases for." (setq class v) (push k keys) (push v keys)))) - (while (let ((arg (car args))) - (or (vectorp arg) - (and arg (symbolp arg)))) - (push (pop args) suffixes)) + (while-let + ((arg (car args)) + (arg (cond + ;; Inline group definition. + ((vectorp arg) + (pop args)) + ;; Quoted include, as one would expect. + ((eq (car-safe arg) 'quote) + (cadr (pop args))) + ;; Unquoted include, for compatibility. + ((and arg (symbolp arg)) + (pop args))))) + (push arg suffixes)) (when (eq (car-safe (car args)) 'declare) (setq declare (car args)) (setq args (cdr args)) |
