[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/inspector d1222593b5 36/93: Housekeeping
From: |
ELPA Syncer |
Subject: |
[elpa] externals/inspector d1222593b5 36/93: Housekeeping |
Date: |
Tue, 24 May 2022 18:57:57 -0400 (EDT) |
branch: externals/inspector
commit d1222593b5375a2f88446812bd60029a043954ae
Author: Mariano Montone <marianomontone@gmail.com>
Commit: Mariano Montone <marianomontone@gmail.com>
Housekeeping
---
inspector.el | 37 ++++++++++++++++++-------------------
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/inspector.el b/inspector.el
index 07bcf978c1..da31c6716e 100644
--- a/inspector.el
+++ b/inspector.el
@@ -32,28 +32,27 @@
;;---- Utils ----------
-(defun princ-to-string (object)
+(defun inspector--princ-to-string (object)
"Print OBJECT to string using `princ'."
(with-output-to-string
(princ object)))
-(defun plistp (list)
+(defun inspector--plistp (list)
"Return T if LIST is a property list."
(let ((expected t))
- (and (cl-evenp (length list))
+ (and (listp list)
+ (cl-evenp (length list))
(cl-every (lambda (x)
(setq expected (if (eql expected t) 'symbol t))
(cl-typep x expected))
list))))
-(defun alistp (list)
+(defun inspector--alistp (list)
"Return T if LIST is an association list."
- (cl-every (lambda (x)
- (and (consp x)
- (symbolp (car x))))
- list))
+ (and (listp list)
+ (cl-every (lambda (x) (consp x)) list)))
-(defun alist-to-plist (alist)
+(defun inspector--alist-to-plist (alist)
"Convert association list ALIST to a property list."
(let ((plist))
(dolist (cons (reverse alist))
@@ -129,7 +128,7 @@
(insert ": "))
(defun inspector--insert-value (value)
- (insert (propertize (princ-to-string value) 'face 'inspector-value-face)))
+ (insert (propertize (inspector--princ-to-string value) 'face
'inspector-value-face)))
(defun inspector--insert-title (title)
"Insert title for inspector."
@@ -147,7 +146,7 @@
(defun inspector--insert-inspect-button (object &optional label)
"Insert button for inspecting OBJECT.
If LABEL has a value, then it is used as button label. Otherwise, button
label is the printed representation of OBJECT."
- (insert-button (or (and label (princ-to-string label))
+ (insert-button (or (and label (inspector--princ-to-string label))
(inspector--print-truncated object))
'action (lambda (btn)
(ignore btn)
@@ -231,7 +230,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
((functionp object)
(inspector--insert-title "Function")
(inspector--insert-label "Name")
- (inspector--insert-value (princ-to-string object))
+ (inspector--insert-value (inspector--princ-to-string object))
(newline)
(inspector--insert-label "Arglist")
(inspector--insert-value (elisp-get-fnsym-args-string object)))
@@ -239,7 +238,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(cl-defmethod inspect-object ((cons cons))
(cond
- ((and (inspector--proper-list-p cons) (plistp cons))
+ ((and (inspector--proper-list-p cons) (inspector--plistp cons))
(inspector--insert-title "Property list")
(let ((plist (cl-copy-list cons)))
(while plist
@@ -270,7 +269,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(prin1 string (current-buffer)))
(cl-defmethod inspect-object ((array array))
- (inspector--insert-title (princ-to-string (type-of array)))
+ (inspector--insert-title (inspector--princ-to-string (type-of array)))
(let ((length (length array)))
(insert (format "Length: %s" length))
(newline 2)
@@ -285,12 +284,12 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(inspector--insert-inspect-button (buffer-name buffer)))
(cl-defmethod inspect-object ((number number))
- (inspector--insert-title (princ-to-string (type-of number)))
+ (inspector--insert-title (inspector--princ-to-string (type-of number)))
(inspector--insert-label "Value")
- (insert (princ-to-string number)))
+ (insert (inspector--princ-to-string number)))
(cl-defmethod inspect-object ((integer integer))
- (inspector--insert-title (princ-to-string (type-of integer)))
+ (inspector--insert-title (inspector--princ-to-string (type-of integer)))
(insert "Integer: ")
(princ integer (current-buffer))
(newline)
@@ -303,7 +302,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(insert (inspector--print-truncated hash-table))
(newline)
(inspector--insert-label "Size")
- (insert (princ-to-string (hash-table-size hash-table)))
+ (insert (inspector--princ-to-string (hash-table-size hash-table)))
(newline 2)
(inspector--insert-label "Values")
(newline)
@@ -383,7 +382,7 @@ When PRESERVE-HISTORY is T, inspector history is not
cleared."
(let* ((nframe (1+ (debugger-frame-number 'skip-base)))
(base (debugger--backtrace-base))
(locals (backtrace--locals nframe base)))
- (inspector-inspect (alist-to-plist locals))))
+ (inspector-inspect (inspector--alist-to-plist locals))))
;;--------- Inspector mode ---------------------------------
- [elpa] externals/inspector 440bd7a530 17/93: Housekeeping, (continued)
- [elpa] externals/inspector 440bd7a530 17/93: Housekeeping, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector d7f85a9c25 16/93: Inspect array, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector cfa57e310b 18/93: Better presentation functions, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 4d409a6715 32/93: Evaluate in menu, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector edbd5c1318 37/93: Association list inspector and custom var to toggle specialized, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 5d014ff023 39/93: Windows, frames, overlays, and buffers inspectors., ELPA Syncer, 2022/05/24
- [elpa] externals/inspector e834de3e6d 03/93: Inspect classes, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector b1035194b0 04/93: Integer printing, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 55a4df0b45 12/93: debugger-inspect-locals, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 1f659d04a6 34/93: Functions inspector, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector d1222593b5 36/93: Housekeeping,
ELPA Syncer <=
- [elpa] externals/inspector 505cd1b077 50/93: tests: classes and structs, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 3a1f745658 56/93: Switch to inspector buffer when opened, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector b782644bbb 67/93: README: evaluate with inspected object, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector fa338ae5ed 90/93: Fontification adjustment, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector e60478dc93 08/93: Linter, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 53e8cc81c0 09/93: Minor mode and navigation, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 4f9961f7bb 11/93: Truncate printed objects, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 6f47c95ea2 21/93: README, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector c0269276bc 22/93: Update README.md, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 37b54f480f 24/93: Screenshot, ELPA Syncer, 2022/05/24