branch: externals/trie
commit acad8e8b29d1081e96e0f273f91edbd397ba6316
Author: Toby Cubitt <[email protected]>
Commit: Toby S. Cubitt <[email protected]>
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))))