[armedbear-cvs] r13696 - trunk/abcl/src/org/armedbear/lisp
astalla at common-lisp.net
astalla at common-lisp.net
Tue Nov 15 22:34:21 UTC 2011
Author: astalla
Date: Tue Nov 15 14:34:19 2011
New Revision: 13696
Log:
DEFMACRO now supports documentation strings as per the ANSI specification.
Modified:
trunk/abcl/src/org/armedbear/lisp/defmacro.lisp
Modified: trunk/abcl/src/org/armedbear/lisp/defmacro.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/defmacro.lisp Tue Nov 8 15:24:05 2011 (r13695)
+++ trunk/abcl/src/org/armedbear/lisp/defmacro.lisp Tue Nov 15 14:34:19 2011 (r13696)
@@ -37,7 +37,7 @@
(defmacro defmacro (name lambda-list &rest body)
(let* ((whole (gensym "WHOLE-"))
(env (gensym "ENVIRONMENT-")))
- (multiple-value-bind (body decls)
+ (multiple-value-bind (body decls documentation)
(parse-defmacro lambda-list whole body name 'defmacro :environment env)
(let ((expander `(lambda (,whole ,env) , at decls ,body)))
`(progn
@@ -47,4 +47,6 @@
`((put ',name 'macroexpand-macro macro))
`((fset ',name macro)))
(%set-arglist macro ',lambda-list)
+ ,@(when documentation
+ `((%set-documentation ',name 'cl:function ,documentation)))
',name))))))
More information about the armedbear-cvs
mailing list