summaryrefslogtreecommitdiff
path: root/llama.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2024-02-28 14:29:33 +0100
committerJonas Bernoulli <jonas@bernoul.li>2024-02-28 14:29:33 +0100
commit55a1caed598804fc4481746cccd115affdf0e449 (patch)
tree8d5e93c71f8d88eda1eb5d201074a4c5791824a8 /llama.el
parent2e995a494dfb67bfea5bbb73982b8ec5a9081dc6 (diff)
llama--collect: Handle dotted lists
Diffstat (limited to 'llama.el')
-rw-r--r--llama.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/llama.el b/llama.el
index 505ac75..a0c7549 100644
--- a/llama.el
+++ b/llama.el
@@ -154,8 +154,14 @@ It also looks a bit like #\\='function."
(error "`%s' and `%s' are mutually exclusive" data (aref args 1)))
(aset args pos data)))))
((eq (car-safe data) '##))
- ((or (listp data)
- (vectorp data))
+ ((listp data)
+ (while (consp (cdr data))
+ (llama--collect (car data) args)
+ (setq data (cdr data)))
+ (when data
+ (llama--collect (car data) args)
+ (llama--collect (cdr data) args)))
+ ((vectorp data)
(mapc (lambda (elt) (llama--collect elt args)) data))))
;;; Advices