[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/inspector d88d248eef 19/93: Presentation improvements
From: |
ELPA Syncer |
Subject: |
[elpa] externals/inspector d88d248eef 19/93: Presentation improvements |
Date: |
Tue, 24 May 2022 18:57:56 -0400 (EDT) |
branch: externals/inspector
commit d88d248eef630f28cfa97a569c6d0a73ebd489d1
Author: Mariano Montone <marianomontone@gmail.com>
Commit: Mariano Montone <marianomontone@gmail.com>
Presentation improvements
---
inspector.el | 37 ++++++++++++++++---------------------
1 file changed, 16 insertions(+), 21 deletions(-)
diff --git a/inspector.el b/inspector.el
index 7bfc78e272..9885933608 100644
--- a/inspector.el
+++ b/inspector.el
@@ -70,12 +70,11 @@
"Main generic interface for filling inspector buffers for the different
types of OBJECT.")
(cl-defmethod inspect-object ((class (subclass eieio-default-superclass)))
- (insert (format "Class: %s" (eioio-class-name class)))
- (newline 2)
+ (inspector--insert-title (format "%s class" (eieio-class-name class)))
(insert "Direct superclasses: ")
(dolist (superclass (eieio-class-parents class))
(inspector--insert-inspect-button
- (eioio-class-name superclass) (eieio-class-name superclass))
+ (eieio-class-name superclass) (eieio-class-name superclass))
(insert " "))
(newline)
(insert "Class slots: ")
@@ -89,10 +88,12 @@
(insert " ")))
(cl-defmethod inspect-object ((object (eql t)))
- (insert "Boolean: t"))
+ (inspector--insert-title "Boolean")
+ (insert "Value: t"))
(cl-defmethod inspect-object ((object (eql nil)))
- (insert "nil"))
+ (inspector--insert-title "nil")
+ (insert "Value: nil"))
(cl-defmethod inspect-object ((object symbol))
(insert (format "Symbol: %s" object)))
@@ -104,7 +105,9 @@
(inspector--insert-inspect-button
(eieio-object-class object)
(eieio-class-name (eieio-object-class object)))
- (newline 2)
+ (newline)
+ (inspector--insert-horizontal-line)
+ (newline)
(insert "Slot values:")
(newline)
(dolist (slot (eieio-class-slots (eieio-object-class object)))
@@ -127,8 +130,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))
- (insert "Property list: ")
- (newline)
+ (inspector--insert-title "Property list")
(let ((plist (copy-list cons)))
(while plist
(let ((key (pop plist)))
@@ -138,10 +140,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(inspector--insert-inspect-button value))
(newline))))
((inspector--proper-list-p cons)
- (insert "Proper list")
- (newline)
- (inspector--insert-horizontal-line)
- (newline)
+ (inspector--insert-title "Proper list")
(let ((i 0))
(dolist (elem cons)
(insert (format "%d: " i))
@@ -149,8 +148,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(newline)
(incf i))))
(t ;; It is a cons cell
- (insert "Cons cell")
- (newline 2)
+ (inspector--insert-title "Cons cell")
(insert "CAR: ")
(inspector--insert-inspect-button (car cons))
(newline)
@@ -158,12 +156,11 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(inspector--insert-inspect-button (cdr cons)))))
(cl-defmethod inspect-object ((string string))
- (insert "String: ")
+ (inspector--insert-title "String")
(prin1 string (current-buffer)))
(cl-defmethod inspect-object ((array array))
- (insert "Array:")
- (newline)
+ (inspector--insert-title (princ-to-string (type-of array)))
(let ((length (length array)))
(insert (format "Length: %s" length))
(newline 2)
@@ -173,10 +170,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(newline))))
(cl-defmethod inspect-object ((buffer buffer))
- (insert "Buffer")
- (newline)
- (inspector--insert-horizontal-line)
- (newline)
+ (inspector--insert-title "Buffer")
(inspector--insert-property "Name")
(inspector--insert-inspect-button (buffer-name buffer)))
@@ -186,6 +180,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(insert (princ-to-string number)))
(cl-defmethod inspect-object ((integer integer))
+ (inspector--insert-title (princ-to-string (type-of integer)))
(insert "Integer: ")
(princ integer (current-buffer))
(newline)
- [elpa] externals/inspector 477e363962 82/93: tests: no more side-effects, (continued)
- [elpa] externals/inspector 477e363962 82/93: tests: no more side-effects, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector b10f60c20d 89/93: Fontification for each type of object, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 6fadd6df9f 93/93: Create LICENSE, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector d5d286c5de 10/93: inspect-last-sexp command, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 30d739e108 53/93: Slice arrays, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector a9e41424fa 66/93: Update README.md, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 4b193ba6d0 69/93: Don't add [more] button when not needed, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 2af90a4c82 83/93: tests: fixes, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 57105aef34 72/93: Update README.md, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 023ae9ca51 92/93: Use value face instead of button face, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector d88d248eef 19/93: Presentation improvements,
ELPA Syncer <=
- [elpa] externals/inspector 57b46a3079 38/93: Bug fix, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 22869bffb4 47/93: Indentation, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector f534e87d1d 54/93: Slice tests, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 5f7ab9bfb7 06/93: Housekeeping, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 7574ca3ff9 51/93: Slice sequences, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 610d67b358 59/93: Test on property lists, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 970fa60851 68/93: Better horizontal line for title underline, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 17f6d1dfaf 71/93: Aesthetic adjustments, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 0dc8dd946b 77/93: Render built-in functions, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector ee6d2ea01b 80/93: More tests, ELPA Syncer, 2022/05/24