[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/inspector 6c071c67b3 60/93: Housekeeping
From: |
ELPA Syncer |
Subject: |
[elpa] externals/inspector 6c071c67b3 60/93: Housekeeping |
Date: |
Tue, 24 May 2022 18:57:59 -0400 (EDT) |
branch: externals/inspector
commit 6c071c67b36c41e7ed7aa72867a757c03ee35157
Author: Mariano Montone <marianomontone@gmail.com>
Commit: Mariano Montone <marianomontone@gmail.com>
Housekeeping
---
inspector.el | 48 ++++++++++++++++++++++++++++++++----------------
1 file changed, 32 insertions(+), 16 deletions(-)
diff --git a/inspector.el b/inspector.el
index 74b31982b4..6c7200d025 100644
--- a/inspector.el
+++ b/inspector.el
@@ -189,11 +189,12 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
'follow-link t))))
(cl-defgeneric inspect-object (object)
- "Main generic interface for filling inspector buffers for the different
types of OBJECT.")
+ "Render inspector buffer for OBJECT.")
;;--------- Object inspectors ----------------------------------
(cl-defmethod inspect-object ((class (subclass eieio-default-superclass)))
+ "Render inspector buffer for EIEIO CLASS."
(inspector--insert-title (format "%s class" (eieio-class-name class)))
(insert "Direct superclasses: ")
(dolist (superclass (eieio-class-parents class))
@@ -212,31 +213,35 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(insert " ")))
(cl-defmethod inspect-object ((object (eql t)))
+ "Render inspector buffer for boolean T."
(ignore object)
(inspector--insert-title "Boolean")
(insert "Value: t"))
(cl-defmethod inspect-object ((object (eql nil)))
+ "Render inspector buffer for NIL object."
(ignore object)
(inspector--insert-title "nil")
(insert "Value: nil"))
-(cl-defmethod inspect-object ((object symbol))
+(cl-defmethod inspect-object ((symbol symbol))
+ "Render inspector buffer for SYMBOL."
(inspector--insert-title "Symbol")
(inspector--insert-label "Name")
- (inspector--insert-value (symbol-name object))
+ (inspector--insert-value (symbol-name symbol))
(newline)
(inspector--insert-label "Is bound")
- (inspector--insert-value (format "%s" (boundp object)))
+ (inspector--insert-value (format "%s" (boundp symbol)))
(newline)
(inspector--insert-label "Function")
- (inspector--insert-inspect-button (symbol-function object))
+ (inspector--insert-inspect-button (symbol-function symbol))
(newline)
(inspector--insert-label "Property list")
- (inspector--insert-inspect-button (symbol-plist object))
+ (inspector--insert-inspect-button (symbol-plist symbol))
(newline))
(cl-defmethod inspect-object ((object t))
+ "Render inspector buffer for OBJECT."
(cond
((eieio-object-p object)
(insert "Instance of ")
@@ -284,6 +289,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(t (error "Cannot inspect object: %s" object))))
(cl-defmethod inspect-object ((cons cons))
+ "Inspect a CONS object."
(cond
((and inspector-use-specialized-inspectors-for-lists
(inspector--plistp cons))
@@ -303,9 +309,10 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(inspector--do-with-slicer-and-more-button
(lambda ()
(when (< i (length cons))
- (subseq cons i (min (incf i inspector-slice-size)
- (length cons)))))
+ (cl-subseq cons i (min (cl-incf i inspector-slice-size)
+ (length cons)))))
(lambda (slice cont)
+ (ignore cont)
(dolist (cons slice)
(insert "(")
(inspector--insert-inspect-button (car cons))
@@ -320,12 +327,13 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(inspector--do-with-slicer-and-more-button
(lambda ()
(when (< i (length cons))
- (subseq cons i (min (incf i inspector-slice-size)
- (length cons)))))
+ (cl-subseq cons i (min (cl-incf i inspector-slice-size)
+ (length cons)))))
(lambda (slice cont)
+ (ignore cont)
(dolist (elem slice)
(insert (format "%d: " j))
- (incf j)
+ (cl-incf j)
(inspector--insert-inspect-button elem)
(newline))))))
(t ;; It is a cons cell
@@ -337,22 +345,24 @@ 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))
+ "Render inspector buffer for STRING."
(inspector--insert-title "String")
(prin1 string (current-buffer)))
(cl-defmethod inspect-object ((array array))
+ "Render inspector buffer for ARRAY."
(inspector--insert-title (inspector--princ-to-string (type-of array)))
- (let ((length (length array))
- (i 0))
+ (let ((length (length array)))
(insert (format "Length: %s" length))
(newline 2)
(let ((i 0))
(inspector--do-with-slicer-and-more-button
(lambda ()
(when (< i length)
- (cons i (1- (min (incf i inspector-slice-size)
+ (cons i (1- (min (cl-incf i inspector-slice-size)
length)))))
(lambda (slice cont)
+ (ignore cont)
(cl-loop for k from (car slice) to (cdr slice)
do
(insert (format "%d: " k))
@@ -360,6 +370,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(newline)))))))
(cl-defmethod inspect-object ((buffer buffer))
+ "Render inspector buffer for Emacs BUFFER."
(inspector--insert-title (prin1-to-string buffer))
(inspector--insert-label "Name")
(inspector--insert-inspect-button (buffer-name buffer))
@@ -378,6 +389,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(inspector--insert-inspect-button cursor-position)))
(cl-defmethod inspect-object ((window window))
+ "Render inspector buffer for Emacs WINDOW."
(inspector--insert-title (prin1-to-string window))
(inspector--insert-label "Parent")
(inspector--insert-inspect-button (window-parent window))
@@ -392,6 +404,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(inspector--insert-inspect-button (window-frame window)))
(cl-defmethod inspect-object ((frame frame))
+ "Render inspector buffer for Emacs FRAME."
(inspector--insert-title (prin1-to-string frame))
(inspector--insert-label "First window")
(inspector--insert-inspect-button (frame-first-window frame))
@@ -400,6 +413,7 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(inspector--insert-inspect-button (frame-parameters frame)))
(cl-defmethod inspect-object ((overlay overlay))
+ "Render inspector buffer for Emacs OVERLAY."
(inspector--insert-title (prin1-to-string overlay))
(inspector--insert-label "Buffer")
(inspector--insert-inspect-button (overlay-buffer overlay))
@@ -414,11 +428,13 @@ If LABEL has a value, then it is used as button label.
Otherwise, button label
(inspector--insert-inspect-button (overlay-properties overlay)))
(cl-defmethod inspect-object ((number number))
+ "Render inspector buffer for NUMBER."
(inspector--insert-title (inspector--princ-to-string (type-of number)))
(inspector--insert-label "Value")
(insert (inspector--princ-to-string number)))
(cl-defmethod inspect-object ((integer integer))
+ "Render inspector buffer for INTEGER."
(inspector--insert-title (inspector--princ-to-string (type-of integer)))
(insert "Integer: ")
(princ integer (current-buffer))
@@ -499,8 +515,8 @@ When PRESERVE-HISTORY is T, inspector history is not
cleared."
(interactive)
(setq inspector-history nil)
(if (window-prev-buffers)
- (quit-window)
- (delete-window))
+ (quit-window)
+ (delete-window))
(kill-buffer "*inspector*"))
(defun inspector-pop ()
- [elpa] externals/inspector 5d9fbcc886 14/93: Use letter 'i' to inspect debugger stack frames, (continued)
- [elpa] externals/inspector 5d9fbcc886 14/93: Use letter 'i' to inspect debugger stack frames, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 75ac7da10e 29/93: Menu and tool bar, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 1e11bb1336 30/93: Evaluate expression with currently inspected object as context, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 701f65aacb 40/93: Inspect buffer contents, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 37dc9503c8 42/93: .., ELPA Syncer, 2022/05/24
- [elpa] externals/inspector fdd7420b8d 43/93: More hash-table details, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 2e23aeae84 48/93: Inspect finalizer type, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector cbb1d1cd2b 49/93: Some basic tests for elisp data types, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 51257fb9b5 55/93: tests: overlays, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 060da36d6f 58/93: Better quit behaviour, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 6c071c67b3 60/93: Housekeeping,
ELPA Syncer <=
- [elpa] externals/inspector e7f2f13ff4 75/93: Start writing ert tests, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector b1d60310da 73/93: Patch by Stefan Monnier, ELPA Syncer, 2022/05/24
- [elpa] externals/inspector 739890b5d6 70/93: Autoloads?, ELPA Syncer, 2022/05/24
- [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