summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2024-10-03 21:06:05 +0200
committerJonas Bernoulli <jonas@bernoul.li>2024-10-03 21:06:05 +0200
commit5db4ead41eee5d44616553ff66c7f9d92604540a (patch)
treed3c6e03622a6dd51b1a82c11a1dffc19178db75e
parentf21fe0c53bdfcef1d554f590ab673acd4677d34a (diff)
llama--collect: Optimize unquoting
This avoids one call to `llama--collect' per ,unquote.
-rw-r--r--llama.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/llama.el b/llama.el
index 0232a24..e8af17e 100644
--- a/llama.el
+++ b/llama.el
@@ -188,11 +188,11 @@ to view this docstring.)"
((memq (car-safe expr) (list (intern "") 'llama 'quote)) expr)
((and backquoted (symbolp expr)) expr)
((and backquoted (eq (car-safe expr) backquote-unquote-symbol))
- (cons backquote-unquote-symbol
- (llama--collect (cdr expr) args)))
+ (list backquote-unquote-symbol
+ (llama--collect (cadr expr) args)))
((eq (car-safe expr) backquote-backquote-symbol)
- (cons backquote-backquote-symbol
- (llama--collect (cdr expr) args nil t)))
+ (list backquote-backquote-symbol
+ (llama--collect (cadr expr) args nil t)))
((symbolp expr)
(let ((name (symbol-name expr)))
(save-match-data