[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/inspector 3e2e8d3476 31/93: Faces
From: |
ELPA Syncer |
Subject: |
[elpa] externals/inspector 3e2e8d3476 31/93: Faces |
Date: |
Tue, 24 May 2022 18:57:57 -0400 (EDT) |
branch: externals/inspector
commit 3e2e8d347628afbac7f9d701702dc39b237de1b7
Author: Mariano Montone <marianomontone@gmail.com>
Commit: Mariano Montone <marianomontone@gmail.com>
Faces
---
inspector.el | 57 ++++++++++++++++++++++++++++++++++++++++-----------------
1 file changed, 40 insertions(+), 17 deletions(-)
diff --git a/inspector.el b/inspector.el
index 60a183ce09..5cfbf15919 100644
--- a/inspector.el
+++ b/inspector.el
@@ -59,18 +59,50 @@
(push (car cons) plist))
plist))
+(defgroup inspector nil
+ "Emacs Lisp inspector customizations."
+ :group 'lisp)
+
+(defface inspector-title-face
+ '((t ()))
+ "Face for title describing object."
+ :group 'inspector)
+
+(defface inspector-label-face
+ '((t (:inherit font-lock-constant-face)))
+ "Face for labels in the inspector."
+ :group 'inspector)
+
+(defface inspector-value-face
+ '((t (:inherit font-lock-builtin-face)))
+ "Face for things which can themselves be inspected."
+ :group 'inspector)
+
+(defface inspector-action-face
+ '((t (:inherit font-lock-warning-face)))
+ "Face for labels of inspector actions."
+ :group 'inspector)
+
+(defface inspector-type-face
+ '((t (:inherit font-lock-type-face)))
+ "Face for type description in inspector."
+ :group 'inspector)
+
(defun inspector--insert-horizontal-line (&rest width)
"Insert an horizontal line with width WIDTH."
(insert (make-string (or width 80) ?\u2500)))
-(defun inspector--insert-property (property-name)
- "Insert an inspector property."
- (insert property-name)
+(defun inspector--insert-label (label)
+ "Insert an inspector label."
+ (insert (propertize label 'face 'inspector-label-face))
(insert ": "))
+(defun inspector--insert-value (value)
+ (insert (propertize (princ-to-string value) 'face 'inspector-value-face)))
+
(defun inspector--insert-title (title)
"Insert title for inspector."
- (insert title)
+ (insert (propertize title 'face 'inspector-title-face))
(newline)
(inspector--insert-horizontal-line)
(newline))
@@ -217,12 +249,12 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(cl-defmethod inspect-object ((buffer buffer))
(inspector--insert-title "Buffer")
- (inspector--insert-property "Name")
+ (inspector--insert-label "Name")
(inspector--insert-inspect-button (buffer-name buffer)))
(cl-defmethod inspect-object ((number number))
(inspector--insert-title (princ-to-string (type-of number)))
- (inspector--insert-property "Value")
+ (inspector--insert-label "Value")
(insert (princ-to-string number)))
(cl-defmethod inspect-object ((integer integer))
@@ -238,10 +270,10 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(inspector--insert-title "Hash table")
(insert (inspector--print-truncated hash-table))
(newline)
- (inspector--insert-property "Size")
+ (inspector--insert-label "Size")
(insert (princ-to-string (hash-table-size hash-table)))
(newline 2)
- (inspector--insert-property "Values")
+ (inspector--insert-label "Values")
(newline)
(maphash (lambda (key value)
(inspector--insert-inspect-button key)
@@ -309,15 +341,6 @@ When ADD-TO-HISTORY is T, OBJECT is added to inspector
history for navigation pu
;; Press letter 'i' in debugger backtrace to inspect locals.
(define-key debugger-mode-map (kbd "i") 'debugger-inspect-locals)
-(defgroup inspector nil
- "Emacs Lisp inspector customizations."
- :group 'lisp)
-
-(defcustom inspector-use-one-buffer t
- "Inspect objects in one buffer."
- :type 'boolean
- :group 'inspector)
-
(defvar inspector-mode-map
(let ((map (make-keymap)))
(define-key map (kbd "q") 'inspector-quit)
- [elpa] externals/inspector 9abd8f6890 91/93: Fix, (continued)
- [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
- [elpa] externals/inspector 20260fc077 15/93: Clean inspector history on exit, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 3e2e8d3476 31/93: Faces,
ELPA Syncer <=
- [elpa] externals/inspector b3833deecb 33/93: Better symbol inspector, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 0fa89e3177 41/93: Make customization group for faces, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 143668d367 01/93: First commit, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 8c083d0ae2 45/93: Update README.md, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 182c1de703 46/93: Inspect record types, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector c8b15291cc 57/93: Tweeks for inspector buffer display, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 584ea2b3e3 62/93: README: demo video, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector b4ff75dda1 61/93: Paginate hash-table inspection, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 0304d42ed1 63/93: Bind 'n' and 'p' to forward and backward button for faster navigation, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 0f444b2b72 64/93: README: navigate buttons with 'n' and 'p', ELPA Syncer, 2022/05/24