[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/trie 6a449ed 049/111: Improved edebug-prin1 advice
From: |
Stefan Monnier |
Subject: |
[elpa] externals/trie 6a449ed 049/111: Improved edebug-prin1 advice |
Date: |
Mon, 14 Dec 2020 11:35:18 -0500 (EST) |
branch: externals/trie
commit 6a449edfb162a3a69a53d791de58175dd0763e35
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: Toby S. Cubitt <toby-predictive@dr-qubit.org>
Improved edebug-prin1 advice
---
trie.el | 27 +++++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/trie.el b/trie.el
index 665d5c4..605eb6c 100644
--- a/trie.el
+++ b/trie.el
@@ -1908,24 +1908,35 @@ elements that matched the corresponding groups, in
order."
(require 'advice))
+(defun trie--edebug-pretty-print (object)
+ (cond
+ ((trie-p object) "#<trie>")
+ ((and object (listp object))
+ (concat "(" (mapconcat 'trie--edebug-pretty-print object " ")
+ ")"))
+ (t (prin1-to-string object))))
+
+
(ad-define-subr-args 'edebug-prin1 '(object &optional printcharfun))
(defadvice edebug-prin1
(around trie activate compile preactivate)
- (if (trie-p object)
- (progn
- (prin1 "#<trie>" printcharfun)
- (setq ad-return-value "<#trie>"))
- ad-do-it))
+ (let ((pretty (trie--edebug-pretty-print object)))
+ (if pretty
+ (progn
+ (prin1 pretty printcharfun)
+ (setq ad-return-value pretty))
+ ad-do-it)))
(ad-define-subr-args 'edebug-prin1-to-string '(object &optional noescape))
(defadvice edebug-prin1-to-string
(around trie activate compile preactivate)
- (if (trie-p object)
- (setq ad-return-value "#<trie>")
- ad-do-it))
+ (let ((pretty (trie--edebug-pretty-print object)))
+ (if pretty
+ (setq ad-return-value pretty)
+ ad-do-it)))
- [elpa] externals/trie f398b8e 063/111: Updated copyright attribution and license (GPL2 -> GPL3)., (continued)
- [elpa] externals/trie f398b8e 063/111: Updated copyright attribution and license (GPL2 -> GPL3)., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 14fa4ee 075/111: Code cleanup., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 1e246d0 009/111: Bug-fix to remove setf inside backquote construct from trie-insert, Stefan Monnier, 2020/12/14
- [elpa] externals/trie ecf872e 061/111: Updated Package-Version, Package-Requires, and Keywords package headers., Stefan Monnier, 2020/12/14
- [elpa] externals/trie d746b4d 017/111: Added safeguards to throw errors if stack operations attempted, Stefan Monnier, 2020/12/14
- [elpa] externals/trie 304b8e9 059/111: Added fboundp guard around ad-define-subr-args (removed in Emacs-24)., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 0ecad1b 016/111: Fixed avl type trie--createfun to accept (and ignore) extra seq argument, Stefan Monnier, 2020/12/14
- [elpa] externals/trie 1b3b473 031/111: Another bug-fix in trie--do-wildcard-search, Stefan Monnier, 2020/12/14
- [elpa] externals/trie 333151b 045/111: Bug-fix in trie--do-regexp-search relating to accumulation of results, Stefan Monnier, 2020/12/14
- [elpa] externals/trie cc94506 070/111: Enable lexical binding, and fix issues it picks up., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 6a449ed 049/111: Improved edebug-prin1 advice,
Stefan Monnier <=
- [elpa] externals/trie 7bf9008 100/111: Implement fuzzy-completion with fixed initial prefix segment., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 3117b5b 076/111: Fix bugs in trie searches introduced by code cleanup., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 5909c59 083/111: Include prefix length information in fuzzy completion results., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 18dc856 084/111: Don't wrap rank and filter functions for regexp and fuzzy queries., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 633c8b1 089/111: Mention iterator generators in Commentary., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 1eb515f 078/111: Implement trie fuzzy match and completion stacks., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 3b7aa3c 082/111: Document that fuzzy queries with distance 0 won't work., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 53146c1 080/111: Implement fuzzy match and completion on dict-trees., Stefan Monnier, 2020/12/14
- [elpa] externals/trie 81268ae 012/111: Added functions for pushing things onto dictree and trie stacks, Stefan Monnier, 2020/12/14
- [elpa] externals/trie a402c27 021/111: Implemented wildcard searches!, Stefan Monnier, 2020/12/14