diff options
Diffstat (limited to 'def.lisp')
-rw-r--r-- | def.lisp | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -133,8 +133,10 @@ E.g. (if other (cons var other) var) ll)))) :finally (return (values (nreverse ll) types))) - `(defun ,name ,lambda-list - (declare ,@type-declarations - (values ,return-type) - (optimize (speed 3) (safety 0))) - ,@body))) + (let ((docstring (when (stringp (first body)) (first body)))) + `(defun ,name ,lambda-list + ,@(when docstring (list docstring)) + (declare ,@type-declarations + (values ,return-type) + (optimize (speed 3) (safety 0))) + ,@(if docstring (rest body) body))))) |