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

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

[elpa] externals/dict-tree 8810d3e 076/154: Bug-fixes to edebug pretty-p


From: Stefan Monnier
Subject: [elpa] externals/dict-tree 8810d3e 076/154: Bug-fixes to edebug pretty-print functions.
Date: Mon, 14 Dec 2020 12:21:48 -0500 (EST)

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

    Bug-fixes to edebug pretty-print functions.
---
 dict-tree.el | 27 ++++++++++++++++++++++-----
 1 file changed, 22 insertions(+), 5 deletions(-)

diff --git a/dict-tree.el b/dict-tree.el
index 1c3c8b5..2278866 100644
--- a/dict-tree.el
+++ b/dict-tree.el
@@ -5,7 +5,7 @@
 ;; Copyright (C) 2004-2009 Toby Cubitt
 
 ;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
-;; Version: 0.12.2
+;; Version: 0.12.3
 ;; Keywords: dictionary, tree
 ;; URL: http://www.dr-qubit.org/emacs.php
 
@@ -53,6 +53,9 @@
 
 ;;; Change log:
 ;;
+;; Version 0.2.3
+;; * bug-fix in `dictree--edebug-pretty-print'
+;;
 ;; Version 0.12.2
 ;; * bug-fix to DEFAULT argument handling in `read-dict'
 ;;
@@ -2485,9 +2488,8 @@ and OVERWRITE is the prefix argument."
                        err))
                    (rename-file (concat tmpfile ".elc")
                                 (concat filename ".elc") t)
-                 (error))))
-         (error (error "Error saving. Dictionary %s NOT saved"
-                       dictname)))
+                 (error ""))))
+         (error "Error saving. Dictionary %s NOT saved" dictname))
 
        ;; if writing to a different name, unload dictionary under old
        ;; name and reload it under new one
@@ -3377,11 +3379,26 @@ extension, suitable for passing to `load-library'."
          (while object
            (setq pretty
                  (concat pretty
-                         (dictree--edebug-pretty-print (pop object))
+                         (dictree--edebug-pretty-print
+                          (if (atom object)
+                              (prog1
+                                  (dictree--edebug-pretty-print object)
+                                (setq object nil))
+                            (pop object)))
                          (when object " "))))
          (concat pretty ")"))
       (concat "(" (dictree--edebug-pretty-print (car object))
              " . " (dictree--edebug-pretty-print (cdr object)) ")")))
+   ((vectorp object)
+    (let ((pretty "[") (len (length object)))
+      (dotimes (i (1- len))
+       (setq pretty
+             (concat pretty
+                     (dictree--edebug-pretty-print (aref object i))
+                     " ")))
+      (concat pretty
+             (dictree--edebug-pretty-print (aref object (1- len)))
+             "]")))
    (t (prin1-to-string object))))
 
 



reply via email to

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