branch: elpa/slime
commit 80ab72dcbafba421b98d4ba5646c0197d885ae1a
Author: Stas Boukarev <[email protected]>
Commit: Stas Boukarev <[email protected]>
Implement structure-accessor-p for CCL and CLISP.
---
swank/ccl.lisp | 5 +++++
swank/clisp.lisp | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/swank/ccl.lisp b/swank/ccl.lisp
index ee978e9254..d29f2ac03a 100644
--- a/swank/ccl.lisp
+++ b/swank/ccl.lisp
@@ -872,3 +872,8 @@
(ccl:hash-table-weak-p hashtable))
(pushnew 'deinit-log-output ccl:*save-exit-functions*)
+
+(defimplementation structure-accessor-p (symbol)
+ (find-if (lambda (def)
+ (typep def 'ccl::structure-accessor-definition-type))
+ (ccl:find-definition-sources symbol) :key #'caar))
diff --git a/swank/clisp.lisp b/swank/clisp.lisp
index f53b40eb6d..1c1be007d9 100644
--- a/swank/clisp.lisp
+++ b/swank/clisp.lisp
@@ -940,3 +940,7 @@ Execute BODY with NAME's function slot set to FUNCTION."
(setf *log-output* nil))
(swank::init-log-output))
custom:*init-hooks*)
+
+(defimplementation structure-accessor-p (symbol)
+ (and (get symbol 'system::defstruct-reader)
+ t))