From c89987c71e6583e2063710cce304204d6f862412 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Wed, 7 Apr 2004 11:30:53 +0000 Subject: [PATCH] 0.8.9.26: 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 | 18 +++++++++++++----- doc/manual/docstrings.lisp | 41 +++++++++++++++++++++------------------- version.lisp-expr | 2 +- 3 files changed, 36 insertions(+), 25 deletions(-) diff --git a/doc/manual/beyond-ansi.texinfo b/doc/manual/beyond-ansi.texinfo index 084fe32..c8f3abb 100644 --- a/doc/manual/beyond-ansi.texinfo +++ b/doc/manual/beyond-ansi.texinfo @@ -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. diff --git a/doc/manual/docstrings.lisp b/doc/manual/docstrings.lisp index 8716cf4..5e6f39d 100644 --- a/doc/manual/docstrings.lisp +++ b/doc/manual/docstrings.lisp @@ -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 @@ -95,14 +96,15 @@ (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") @@ -112,20 +114,20 @@ (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}") @@ -135,7 +137,7 @@ (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")))) @@ -164,9 +166,10 @@ (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") @@ -193,7 +196,7 @@ :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) @@ -216,7 +219,7 @@ (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") @@ -224,7 +227,7 @@ :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) diff --git a/version.lisp-expr b/version.lisp-expr index 113a7a0..79848cd 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4