[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/inspector 0858144fd9 1/4: Button to switch to alist and
From: |
ELPA Syncer |
Subject: |
[elpa] externals/inspector 0858144fd9 1/4: Button to switch to alist and plist view |
Date: |
Wed, 18 Jan 2023 18:57:45 -0500 (EST) |
branch: externals/inspector
commit 0858144fd9982172711a546dacfe92c31dab33de
Author: Mariano Montone <marianomontone@gmail.com>
Commit: Mariano Montone <marianomontone@gmail.com>
Button to switch to alist and plist view
---
inspector.el | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/inspector.el b/inspector.el
index fbd226bbd4..ae15348711 100644
--- a/inspector.el
+++ b/inspector.el
@@ -480,7 +480,29 @@ is expected to be used.")
;; A [more] button is inserted or not depending on the boolean
returned here:
(< i (length cons))))))
((inspector--proper-list-p cons)
- (inspector--insert-title "proper list")
+ (and inspector-use-specialized-inspectors-for-lists
+ (funcall inspector-plist-detection-function cons))
+ (insert (propertize "proper list" 'face 'inspector-title-face))
+ (insert " ")
+ (when (funcall inspector-alist-detection-function cons)
+ (insert-button "[as alist]"
+ 'action (lambda (_btn)
+ (let
((inspector-use-specialized-inspectors-for-lists t))
+ (setf buffer-read-only nil
+ (buffer-string) "")
+ (inspector-inspect-object cons)))
+ 'follow-link t))
+ (when (funcall inspector-plist-detection-function cons)
+ (insert-button "[as plist]"
+ 'action (lambda (_btn)
+ (let
((inspector-use-specialized-inspectors-for-lists t))
+ (setf buffer-read-only nil
+ (buffer-string) "")
+ (inspector-inspect-object cons)))
+ 'follow-link t))
+ (newline)
+ (inspector--insert-horizontal-line)
+ (newline)
(inspector--insert-label "length")
(insert (inspector--princ-to-string (length cons)))
(newline 2)