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

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

[elpa] externals/trie acad8e8 050/111: Bug-fixes to edebug advice


From: Stefan Monnier
Subject: [elpa] externals/trie acad8e8 050/111: Bug-fixes to edebug advice
Date: Mon, 14 Dec 2020 11:35:18 -0500 (EST)

branch: externals/trie
commit acad8e8b29d1081e96e0f273f91edbd397ba6316
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: Toby S. Cubitt <toby-predictive@dr-qubit.org>

    Bug-fixes to edebug advice
---
 trie.el | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/trie.el b/trie.el
index 605eb6c..ec35efe 100644
--- a/trie.el
+++ b/trie.el
@@ -1911,9 +1911,17 @@ elements that matched the corresponding groups, in 
order."
 (defun trie--edebug-pretty-print (object)
   (cond
    ((trie-p object) "#<trie>")
-   ((and object (listp object))
-    (concat "(" (mapconcat 'trie--edebug-pretty-print object " ")
-           ")"))
+   ((consp object)
+    (if (consp (cdr object))
+       (let ((pretty "("))
+         (while object
+           (setq pretty
+                 (concat pretty
+                         (trie--edebug-pretty-print (pop object))
+                         (when object " "))))
+         (concat pretty ")"))
+      (concat "(" (trie--edebug-pretty-print (car object))
+             " . " (trie--edebug-pretty-print (cdr object)) ")")))
    (t (prin1-to-string object))))
 
 



reply via email to

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