[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] externals/sly e7f0333 40/47: abcl: fix inspector for a STRUCTUR
From: |
ELPA Syncer |
Subject: |
[nongnu] externals/sly e7f0333 40/47: abcl: fix inspector for a STRUCTURE-OBJECT with no inspectable parts |
Date: |
Thu, 17 Dec 2020 18:57:21 -0500 (EST) |
branch: externals/sly
commit e7f0333b95aade4b63a181bc45fd97edf56df7a7
Author: Mark <evenson.not.org@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
abcl: fix inspector for a STRUCTURE-OBJECT with no inspectable parts
Unfortunately, not all system defined STRUCTURE-OBJECT instances
implement the getParts() protocol to expose their inspectable parts.
If this is the case, we now emit a message rather than bombing into an
error.
* slynk/backend/abcl.lisp: Rework it.
Cherry-picked-from: SLIME commit a4de28b0c1de98f2bb29cb448c05cb664255ee43
Co-authored-by: João Távora <joaotavora@gmail.com>
---
slynk/backend/abcl.lisp | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/slynk/backend/abcl.lisp b/slynk/backend/abcl.lisp
index 64bfa11..2bc0c0e 100644
--- a/slynk/backend/abcl.lisp
+++ b/slynk/backend/abcl.lisp
@@ -1351,20 +1351,21 @@
fields)))))
(defmethod emacs-inspect ((object sys::structure-object))
- (let ((structure-def (get (type-of object) 'system::structure-definition )))
- `((:label "Type: ") (:value ,(type-of object)) (:newline)
- (:label "Class: ") (:value ,(class-of object)) (:newline)
- ,@(inspector-structure-slot-names-and-values object))))
+ `((:label "Type: ") (:value ,(type-of object)) (:newline)
+ (:label "Class: ") (:value ,(class-of object)) (:newline)
+ ,@(inspector-structure-slot-names-and-values object)))
(defun inspector-structure-slot-names-and-values (structure)
(let ((structure-def (get (type-of structure)
'system::structure-definition)))
- `((:label "Slots: ") (:newline)
- ,@(loop for slotdef in (sys::dd-slots structure-def)
- for name = (sys::dsd-name slotdef)
- for reader = (sys::dsd-reader slotdef)
- for value = (eval `(,reader ,structure))
- append
- `(" " (:label ,(string-downcase (string name))) ": " (:value
,value) (:newline))))))
+ (if structure-def
+ `((:label "Slots: ") (:newline)
+ ,@(loop for slotdef in (sys::dd-slots structure-def)
+ for name = (sys::dsd-name slotdef)
+ for reader = (sys::dsd-reader slotdef)
+ for value = (eval `(,reader ,structure))
+ append
+ `(" " (:label ,(string-downcase (string name))) ": "
(:value ,value) (:newline))))
+ `("No slots available for inspection."))))
(defmethod emacs-inspect ((object sys::structure-class))
(let* ((name (jss::get-java-field object "name" t))
- [nongnu] externals/sly 47e8d27 05/47: add architecture :aarch64 (for ECL), (continued)
- [nongnu] externals/sly 47e8d27 05/47: add architecture :aarch64 (for ECL), ELPA Syncer, 2020/12/17
- [nongnu] externals/sly f7c6048 08/47: arglist-dispatch: better handling of closer-mop wrappers., ELPA Syncer, 2020/12/17
- [nongnu] externals/sly bf157ae 10/47: Changed the name of a function in Clasp, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 57b6d3f 18/47: abcl: consolidate fixes and features, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly e79f9f2 23/47: sbcl: consult sb-impl:+internal-features+ when reading source files., ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 3bd8696 24/47: Move *features* binding up, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 276b18c 39/47: abcl: guard against repeated invocation to SLYNK-BACKEND:WRAP, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 47afe17 41/47: Fix #386: Unbreak Clasp common lisp for SLYfun, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 5bd0081 12/47: *architecture-features*: add ppc64, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 791f7b7 17/47: Calculate condition-location properly for clasp, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly e7f0333 40/47: abcl: fix inspector for a STRUCTURE-OBJECT with no inspectable parts,
ELPA Syncer <=
- [nongnu] externals/sly 5f15cf1 43/47: Use defgeneric lambda list in defmethod arglists, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly ae4bbca 45/47: Don't force mREPL to use channel thread for everything, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly e927cda 47/47: Release SLY 1.0.42, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly a1fc34c 03/47: Add a name to the mailbox lock for clasp, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly b2732f4 15/47: Add line, column kw args to slynk-compile-string, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 5ec798d 19/47: decode-arglist: don't fall on arglist-dummy., ELPA Syncer, 2020/12/17
- [nongnu] externals/sly a0308b7 21/47: fix spurious detection of allegro modern-mode (#540), ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 9392ac9 32/47: Fix collect-macro-forms in clasp, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly 3c83b6f 06/47: Improve jump to source with 'v' in sldb in clasp, ELPA Syncer, 2020/12/17
- [nongnu] externals/sly c74ef16 14/47: Improve source locations for inlined code in clasp, ELPA Syncer, 2020/12/17