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

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

[elpa] externals/inspector 16f833d3bb 05/93: Housekeeping


From: ELPA Syncer
Subject: [elpa] externals/inspector 16f833d3bb 05/93: Housekeeping
Date: Tue, 24 May 2022 18:57:55 -0400 (EDT)

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

    Housekeeping
---
 emacs-inspector.el | 37 +++++++++++++++----------------------
 1 file changed, 15 insertions(+), 22 deletions(-)

diff --git a/emacs-inspector.el b/emacs-inspector.el
index fea6eec0bd..dc53fb8582 100644
--- a/emacs-inspector.el
+++ b/emacs-inspector.el
@@ -6,6 +6,20 @@
   (with-output-to-string
     (princ x)))
 
+(defun plistp (list)
+  (let ((expected t))
+    (and (evenp (length list))
+         (every (lambda (x)
+                  (setq expected (if (eql expected t) 'symbol t))
+                  (typep x expected))
+                list))))
+
+(defun alistp (list)
+  (every (lambda (x)
+           (and (consp x)
+                (symbolp (car x))))
+         list))
+
 (cl-defgeneric inspect-object (object))
 
 (cl-defmethod inspect-object ((class (subclass eieio-default-superclass)))
@@ -53,30 +67,9 @@
       (newline)))
    (t (error "Cannot inspect object: %s" object))))
 
-(defun plistp (list)
-  (let ((expected t))
-    (and (evenp (length list))
-         (every (lambda (x)
-                  (setq expected (if (eql expected t) 'symbol t))
-                  (typep x expected))
-                list))))
-
-(plistp '(as 2 asdf 2))
-(plistp '(as 2 asdf 2 bb))
-(plistp '(as 2 asdf 2 33))
-
-(defun alistp (list)
-  (every (lambda (x)
-           (and (consp x)
-                (symbolp (car x))))
-         list))
-
-(alistp '(a b c))
-(alistp '((a . 22) (b . "foo")))
-
 (defun emacs-inspector--insert-inspect-button (object &optional label)
   (insert-button (or (and label (princ-to-string label))
-                    (princ-to-string object))
+                     (prin1-to-string object))
                  'action (lambda (btn)
                            (emacs-inspector-inspect object))
                  'follow-link t))



reply via email to

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