diff options
| author | Jonas Bernoulli <jonas@bernoul.li> | 2024-09-07 14:02:38 +0200 |
|---|---|---|
| committer | Jonas Bernoulli <jonas@bernoul.li> | 2024-09-07 14:02:38 +0200 |
| commit | 0b881ab4542e3b900bfbeec811fa0c932be2ea29 (patch) | |
| tree | a9ed6fb23ed98ae979c3fcf5e47a435455a913f5 | |
| parent | 732389e3886b510c2661d7d4fd65e01837211e8a (diff) | |
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.
| -rw-r--r-- | llama.el | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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))) |
