branch: elpa/llama
commit 0b881ab4542e3b900bfbeec811fa0c932be2ea29
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    llama--collect: Fix return value for dotted lists
    
    Previously only the last cons-cell was returned.  Now the expression is
    returned unchanged.  That means that we still do not remove explicit
    unused arguments from the returned value.  As before these have to be
    placed elsewhere.
---
 llama.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/llama.el b/llama.el
index c4831c0ef6..d5a437a9a4 100644
--- a/llama.el
+++ b/llama.el
@@ -203,13 +203,13 @@ this trickery, you can alternatively use this macro under 
the name
                      (list symbol))))
             expr))
    ((listp expr)
-    (while (consp (cdr expr))
-      (llama--collect (car expr) args)
-      (setq expr (cdr expr)))
-    (when expr
-      (llama--collect (car expr) args)
-      (llama--collect (cdr expr) args))
-    expr)
+    (prog1 expr
+      (while (consp (cdr expr))
+        (llama--collect (car expr) args)
+        (setq expr (cdr expr)))
+      (when expr
+        (llama--collect (car expr) args)
+        (llama--collect (cdr expr) args))))
    ((vectorp expr)
     (vconcat (mapcar (lambda (elt) (llama--collect elt args)) expr)))
    (expr)))

Reply via email to