branch: externals/dict-tree commit df22e8e3603f9279389cadd8d9577133ec1afbd1 Author: Toby Cubitt <toby-predict...@dr-qubit.org> Commit: Toby S. Cubitt <toby-predict...@dr-qubit.org>
Bug-fixes to edebug advice --- dict-tree.el | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dict-tree.el b/dict-tree.el index e17eac1..310e45b 100644 --- a/dict-tree.el +++ b/dict-tree.el @@ -3368,9 +3368,17 @@ extension, suitable for passing to `load-library'." (cond ((dictree-p object) (concat "#<dict-tree \"" (dictree-name object) "\">")) - ((and object (listp object)) - (concat "(" (mapconcat 'dictree--edebug-pretty-print object " ") - ")")) + ((consp object) + (if (consp (cdr object)) + (let ((pretty "(")) + (while object + (setq pretty + (concat pretty + (dictree--edebug-pretty-print (pop object)) + (when object " ")))) + (concat pretty ")")) + (concat "(" (dictree--edebug-pretty-print (car object)) + " . " (dictree--edebug-pretty-print (cdr object)) ")"))) (t (prin1-to-string object))))