emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/inspector a388d86954 1/2: Customizable alist and plist


From: ELPA Syncer
Subject: [elpa] externals/inspector a388d86954 1/2: Customizable alist and plist detection functions
Date: Wed, 18 Jan 2023 17:57:50 -0500 (EST)

branch: externals/inspector
commit a388d8695469dea732710fdc4083790465d4eeb2
Author: Mariano Montone <marianomontone@gmail.com>
Commit: Mariano Montone <marianomontone@gmail.com>

    Customizable alist and plist detection functions
---
 inspector.el | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/inspector.el b/inspector.el
index ed2a6f3fa4..85e5a673ed 100644
--- a/inspector.el
+++ b/inspector.el
@@ -158,6 +158,16 @@
   :type 'integer
   :group 'inspector)
 
+(defcustom inspector-plist-detection-function 'inspector--plistp
+  "Function used by the inspector to determine if a list is a property list."
+  :type 'symbol
+  :group 'inspector)
+
+(defcustom inspector-alist-detection-function 'inspector--alistp
+  "Function used by the inspector to determine if a list is an association 
list."
+  :type 'symbol
+  :group 'inspector)
+
 (define-button-type 'inspector-button
   'follow-link t
   'face 'inspector-button-face
@@ -411,7 +421,7 @@ is expected to be used.")
   "Inspect a CONS object."
   (cond
    ((and inspector-use-specialized-inspectors-for-lists
-         (inspector--plistp cons))
+         (funcall inspector-plist-detection-function cons))
     (inspector--insert-title "property list")
     (inspector--insert-label "length")
     (insert (inspector--princ-to-string (length cons)))
@@ -425,7 +435,7 @@ is expected to be used.")
           (inspector--insert-inspect-button value))
         (newline))))
    ((and inspector-use-specialized-inspectors-for-lists
-         (inspector--alistp cons))
+         (funcall inspector-alist-detection-function cons))
     (inspector--insert-title "association list")
     (inspector--insert-label "length")
     (insert (inspector--princ-to-string (length cons)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]