Move documentation function to src/documentation.lisp
authorDavid Vázquez <davazp@gmail.com>
Thu, 29 Aug 2013 10:19:14 +0000 (12:19 +0200)
committerDavid Vázquez <davazp@gmail.com>
Thu, 29 Aug 2013 10:19:14 +0000 (12:19 +0200)
src/boot.lisp
src/documentation.lisp

index 5f6bbca..856879f 100644 (file)
   (write-line (lambda-code (fdefinition function)))
   nil)
 
-(defun documentation (x type)
-  "Return the documentation of X. TYPE must be the symbol VARIABLE or FUNCTION."
-  (ecase type
-    (function
-     (let ((func (fdefinition x)))
-       (oget func "docstring")))
-    (variable
-     (unless (symbolp x)
-       (error "The type of documentation `~S' is not a symbol." type))
-     (oget x "vardoc"))))
-
 (defmacro multiple-value-bind (variables value-from &body body)
   `(multiple-value-call (lambda (&optional ,@variables &rest ,(gensym))
                           ,@body)
index 5735e9e..89e3404 100644 (file)
@@ -1,5 +1,18 @@
 ;;; documentation.lisp --- Accessing DOCUMENTATION
 
+;;; Documentation.
+(defun documentation (x type)
+  "Return the documentation of X. TYPE must be the symbol VARIABLE or FUNCTION."
+  (ecase type
+    (function
+     (let ((func (fdefinition x)))
+       (oget func "docstring")))
+    (variable
+     (unless (symbolp x)
+       (error "The type of documentation `~S' is not a symbol." type))
+     (oget x "vardoc"))))
+
+
 ;;; APROPOS and friends
 
 (defun map-apropos-symbols (function string package external-only)