[slime-cvs] CVS update: slime/swank-clisp.lisp
Helmut Eller
heller at common-lisp.net
Wed Jun 1 12:22:29 UTC 2005
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv11352
Modified Files:
swank-clisp.lisp
Log Message:
Distinguish macro and special operators from functions.
Date: Wed Jun 1 14:22:28 2005
Author: heller
Index: slime/swank-clisp.lisp
diff -u slime/swank-clisp.lisp:1.46 slime/swank-clisp.lisp:1.47
--- slime/swank-clisp.lisp:1.46 Sun Mar 27 20:40:51 2005
+++ slime/swank-clisp.lisp Wed Jun 1 14:22:28 2005
@@ -143,16 +143,23 @@
"Return a plist describing SYMBOL.
Return NIL if the symbol is unbound."
(let ((result ()))
- (labels ((doc (kind)
- (or (documentation symbol kind) :not-documented))
- (maybe-push (property value)
- (when value
- (setf result (list* property value result)))))
- (when (fboundp symbol)
- (if (macro-function symbol)
- (setf (getf result :macro) (doc 'function))
- (setf (getf result :function) (doc 'function))))
+ (flet ((doc (kind)
+ (or (documentation symbol kind) :not-documented))
+ (maybe-push (property value)
+ (when value
+ (setf result (list* property value result)))))
(maybe-push :variable (when (boundp symbol) (doc 'variable)))
+ (when (fboundp symbol)
+ (maybe-push
+ ;; Report WHEN etc. as macros, even though they may be
+ ;; implemented as special operators.
+ (if (macro-function symbol) :macro
+ (typecase (fdefinition symbol)
+ (generic-function :generic-function)
+ (function :function)
+ ;; (type-of 'progn) -> ext:special-operator
+ (t :special-operator)))
+ (doc 'function)))
(maybe-push :class (when (find-class symbol nil)
(doc 'type))) ;this should be fixed
result)))
More information about the slime-cvs
mailing list