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

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

[elpa] externals/dict-tree a4b2a1b 126/154: Improve edebug pretty-printi


From: Stefan Monnier
Subject: [elpa] externals/dict-tree a4b2a1b 126/154: Improve edebug pretty-printing.
Date: Mon, 14 Dec 2020 12:21:59 -0500 (EST)

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

    Improve edebug pretty-printing.
---
 dict-tree.el | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/dict-tree.el b/dict-tree.el
index 1230627..d0d8ed6 100644
--- a/dict-tree.el
+++ b/dict-tree.el
@@ -3982,7 +3982,39 @@ extension, suitable for passing to `load-library'."
   (require 'advice))
 
 (defun dictree--prin1 (dict stream)
-  (princ (concat "#<dict-tree \"" (dictree-name dict) "\">") stream))
+  (princ (concat "#<dict-tree \"" (dictree-name dict) "\""
+                (if (dictree--lookup-cache dict)
+                    (concat " lookup "
+                            (prin1-to-string
+                             (hash-table-count
+                              (dictree--lookup-cache dict))))
+                  "")
+                (if (dictree--complete-cache dict)
+                    (concat " complete "
+                            (prin1-to-string
+                             (hash-table-count
+                              (dictree--complete-cache dict))))
+                  "")
+                (if (dictree--regexp-cache dict)
+                    (concat " regexp "
+                            (prin1-to-string
+                             (hash-table-count
+                              (dictree--regexp-cache dict))))
+                  "")
+                (if (dictree--fuzzy-match-cache dict)
+                    (concat " fuzzy-match "
+                            (prin1-to-string
+                             (hash-table-count
+                              (dictree--fuzzy-match-cache dict))))
+                  "")
+                (if (dictree--fuzzy-complete-cache dict)
+                    (concat " fuzzy-complete "
+                            (prin1-to-string
+                             (hash-table-count
+                              (dictree--fuzzy-complete-cache dict))))
+                  "")
+                ">")
+        stream))
 
 (defun dictree--edebug-pretty-print (object)
   (cond
@@ -4071,6 +4103,7 @@ extension, suitable for passing to `load-library'."
          (setq ad-return-value pretty)
         ad-do-it))))
 
+
 (provide 'dict-tree)
 
 ;;; dict-tree.el ends here



reply via email to

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