emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/macrostep ee46132 008/110: Print dotted lists in expansion


From: ELPA Syncer
Subject: [nongnu] elpa/macrostep ee46132 008/110: Print dotted lists in expansions correctly
Date: Sat, 7 Aug 2021 09:17:51 -0400 (EDT)

branch: elpa/macrostep
commit ee46132b5be689b573d3386284ad53aa35de4d8c
Author: joddie <jonxfield@gmail.com>
Commit: joddie <jonxfield@gmail.com>

    Print dotted lists in expansions correctly
---
 macrostep.el | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/macrostep.el b/macrostep.el
index 06f333e..0bdcc3c 100644
--- a/macrostep.el
+++ b/macrostep.el
@@ -566,15 +566,21 @@ sub-forms. See also `macrostep-sexp-at-point'."
               (insert " ")
               (setq sexp (cdr sexp)))
             ;; print remaining list elements
-            (dolist (inner sexp)
-              (macrostep-print-sexp inner)
-              (insert " "))
-            (backward-delete-char 1)
+             (while sexp
+               (if (listp sexp)
+                   (progn
+                     (macrostep-print-sexp (car sexp))
+                     (when (cdr sexp) (insert " "))
+                     (setq sexp (cdr sexp)))
+                 ;; Print tail of dotted list
+                 (insert ". ")
+                 (macrostep-print-sexp sexp)
+                 (setq sexp nil)))
             (insert ")")))))
 
    ;; print non-lists as normal
    (t (prin1 sexp (current-buffer)))))
-  
+
 
 
 (provide 'macrostep)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]