0.8.9.26:
authorChristophe Rhodes <csr21@cam.ac.uk>
Wed, 7 Apr 2004 11:30:53 +0000 (11:30 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Wed, 7 Apr 2004 11:30:53 +0000 (11:30 +0000)
More docstrings fixes
... COLLECT-DOCUMENTATION should always return RESULT, even when
the package itself is undocumented;
... make the unique name reflect the package being documented,
not the home package of the symbol, so reexports
work right;
... get special-operators more right;
... also include one or two of these things in the manual so we
get a feel for what's going on.

doc/manual/beyond-ansi.texinfo
doc/manual/docstrings.lisp
version.lisp-expr

index 084fe32..c8f3abb 100644 (file)
@@ -294,11 +294,15 @@ The UNIX command line can be read from the variable
 @code{sb-ext:*posix-argv*}. The UNIX environment can be queried with
 the @code{sb-ext:posix-getenv} function.
 
+@include fun-sb-ext-posix-getenv.texinfo
+
 The SBCL system can be terminated with @code{sb-ext:quit}, (but see
-notes above about threads and sessions) optionally returning a
-specified numeric value to the calling Unix process. The normal Unix
-idiom of terminating on end of file on input is also supported.
+notes in @ref{Threading} about the interaction between this feature and
+sessions) optionally returning a specified numeric value to the
+calling Unix process. The normal Unix idiom of terminating on end of
+file on input is also supported.
 
+@include fun-sb-ext-quit.texinfo
 
 @node  Customization Hooks for Users, Tools To Help Developers, Support For Unix, Extensions
 @comment  node-name,  next,  previous,  up
@@ -384,10 +388,14 @@ addresses, a precondition for using copy-on-write to share code
 between multiple Lisp processes. it is less important with modern
 generational garbage collectors.
 
-@code{sb-ext:truly-the} declaration declares the type of the result of
-the operations, producing its argument; the declaration is not
+@include fun-sb-ext-purify.texinfo
+
+@code{sb-ext:truly-the} special form declares the type of the result
+of the operations, producing its argument; the declaration is not
 checked. In short: don't use it.
 
+@include special-operator-sb-ext-truly-the.texinfo
+
 The @code{sb-ext:freeze-type} declaration declares that a
 type will never change, which can make type testing
 (@code{typep}, etc.) more efficient for structure types.
index 8716cf4..5e6f39d 100644 (file)
@@ -40,7 +40,8 @@
         (when docs (setf result (nconc docs result)))))
     (when package-doc
       (setf result (nconc (list (list (intern (package-name package) :keyword)
-                                      'package package-doc)) result)))))
+                                      'package package-doc)) result)))
+    result))
 
 ;;; Helpers for texinfo output
 
                                     (subseq name (1+ index))))))
     name))
 
-(defun unique-name (symbol kind)
+(defun unique-name (symbol package kind)
   (nstring-downcase
    (format nil "~A-~A-~A"
            (ecase kind
              (compiler-macro "compiler-macro")
-             (function (if (macro-function symbol)
-                           "macro"
-                           "fun"))
+             (function (cond
+                        ((macro-function symbol) "macro")
+                        ((special-operator-p symbol) "special-operator")
+                        (t "fun")))
              (method-combination "method-combination")
              (package "package")
              (setf "setf-expander")
                       (structure-class "struct")
                       (standard-class "class")
                       (sb-pcl::condition-class "condition")
-                      (null "type"))))
+                      ((or built-in-class null) "type"))))
              (variable (if (constantp symbol)
                            "constant"
                            "var")))
-           (package-name (symbol-package symbol))
-           (alphanumize symbol)
-           )))
+           (package-name package)
+           (alphanumize symbol))))
 
 (defun def-begin (symbol kind)
   (ecase kind
     (compiler-macro "@deffn {Compiler Macro}")
-    (function (if (macro-function symbol)
-                  "@defmac"
-                  "@defun"))
+    (function (cond
+               ((macro-function symbol) "@defmac")
+               ((special-operator-p symbol) "@defspec")
+               (t "@defun")))
     (method-combination "@deffn {Method Combination}")
     (package "@deffn Package")
     (setf "@deffn {Setf Expander}")
              (structure-class "@deftp Structure")
              (standard-class "@deftp Class")
              (sb-pcl::condition-class "@deftp Condition")
-             (null "@deftp Type"))))
+             ((or built-in-class null) "@deftp Type"))))
     (variable (if (constantp symbol)
                   "@defvr Constant"
                   "@defvar"))))
 (defun def-end (symbol kind)
   (ecase kind
     (compiler-macro "@end deffn")
-    (function (if (macro-function symbol)
-                  "@end defmac"
-                  "@end defun"))
+    (function (cond
+               ((macro-function symbol) "@end defmac")
+               ((special-operator-p symbol) "@end defspec")
+               (t "@end defun")))
     (method-combination "@end deffn")
     (package "@end deffn")
     (setf "@end deffn")
                          :if-does-not-exist :create :if-exists :supersede)
       (loop for (symbol kind docstring) in docs
            do (format out "~&@anchor{~A}~%~A ~A~@[ ~A~]~%~A~%~A~%~%"
-                      (unique-name symbol kind)
+                      (unique-name symbol package kind)
                       (def-begin symbol kind)
                       (texinfoify symbol)
                       (def-rest symbol kind)
       (loop
          with docs = (collect-documentation (find-package package))
          for (symbol kind docstring) in docs
-         for doc-identifier = (unique-name symbol kind)
+         for doc-identifier = (unique-name symbol package kind)
          do (with-open-file (out
                              (merge-pathnames
                               (make-pathname :name doc-identifier :type "texinfo")
                              :direction :output
                              :if-does-not-exist :create :if-exists :supersede)
               (format out "~&@anchor{~A}~%~A ~A~@[ ~A~]~%~A~%~A~%~%"
-                      (unique-name symbol kind)
+                      (unique-name symbol package kind)
                       (def-begin symbol kind)
                       (texinfoify symbol)
                       (def-rest symbol kind)
index 113a7a0..79848cd 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.9.25"
+"0.8.9.26"