[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/inspector e1395930a6 86/93: Proper faces for inspector
From: |
ELPA Syncer |
Subject: |
[elpa] externals/inspector e1395930a6 86/93: Proper faces for inspector buttons |
Date: |
Tue, 24 May 2022 18:58:02 -0400 (EDT) |
branch: externals/inspector
commit e1395930a68a5d813169a85bef4b64e74a040b0e
Author: Mariano Montone <marianomontone@gmail.com>
Commit: Mariano Montone <marianomontone@gmail.com>
Proper faces for inspector buttons
---
inspector.el | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/inspector.el b/inspector.el
index 870e9fcf91..241f568bbb 100644
--- a/inspector.el
+++ b/inspector.el
@@ -79,6 +79,11 @@
"Emacs Lisp inspector faces."
:group 'faces)
+(defface inspector-button-face
+ '((t :inherit link))
+ "Face for inspector buttons."
+ :group 'inspector-faces)
+
(defface inspector-title-face
'((t ()))
"Face for title describing object."
@@ -124,6 +129,11 @@
:type 'integer
:group 'inspector)
+(define-button-type 'inspector-button
+ 'follow-link t
+ 'face 'inspector-button-face
+ 'help-echo "Inspect object")
+
;;-------- Inspector code -------------------
(defvar-local inspector-history nil
@@ -137,22 +147,24 @@
(insert (make-string (or width (window-text-width)) ?\u2500)))
(defun inspector--insert-label (label)
- "Insert an inspector label."
+ "Show a LABEL in inspector buffer."
(insert (propertize label 'face 'inspector-label-face))
(insert ": "))
(defun inspector--insert-value (value)
+ "Show a property VALUE in inspector buffer."
(insert (propertize (inspector--princ-to-string value) 'face
'inspector-value-face)))
(defun inspector--insert-title (title)
- "Insert title for inspector."
+ "Insert TITLE for inspector."
(insert (propertize title 'face 'inspector-title-face))
(newline)
(inspector--insert-horizontal-line)
(newline))
(defun inspector--print-truncated (object &optional end-column)
- "Print OBJECT truncated. END-COLUMN controls the truncation."
+ "Print OBJECT to a string, truncated.
+END-COLUMN controls the truncation."
(truncate-string-to-width (prin1-to-string object)
(or end-column inspector-end-column)
nil nil t))
@@ -163,6 +175,7 @@ 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 (inspector--princ-to-string label))
(inspector--print-truncated object))
+ :type 'inspector-button
'action (lambda (_btn)
(inspector-inspect object t))
'follow-link t))
- [elpa] externals/inspector 5f7ab9bfb7 06/93: Housekeeping, (continued)
- [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
- [elpa] externals/inspector d60552c6d2 76/93: Some more tests, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector ce05c412ba 81/93: More tests, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 40b9031bd8 84/93: Delete .github, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector e1395930a6 86/93: Proper faces for inspector buttons,
ELPA Syncer <=
- [elpa] externals/inspector 0c92102cfd 87/93: Inherit from fundamental-mode, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 9abd8f6890 91/93: Fix, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector f8affefb73 35/93: Major mode for inspector, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 49c8c75ada 44/93: Fixes to Emacs debug backtrace inspection, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 5b808173cc 52/93: Slice with [more] button, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector bc118aa31a 65/93: Show length of lists, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 094cd26780 78/93: More tests, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 902ffcfdfc 79/93: .gitignore, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector e9b4f2e276 85/93: tests: adjustment, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 8a3d1b8627 88/93: Display some more buffer properties, ELPA Syncer, 2022/05/24