~ubuntu-branches/ubuntu/quantal/gclcvs/quantal

« back to all changes in this revision

Viewing changes to lsp/gcl_doc-file.lsp

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2004-06-24 15:13:46 UTC
  • Revision ID: james.westby@ubuntu.com-20040624151346-xh0xaaktyyp7aorc
Tags: 2.7.0-26
C_GC_OFFSET is 2 on m68k-linux

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(defun doc-file (file packages)
 
2
;;Write FILE of doc strings for all symbols in PACKAGES
 
3
;;This file is suitable for use with the find-doc function.
 
4
  #+kcl
 
5
  (and (member 'lisp packages)
 
6
       (not (documentation 'setq 'function))
 
7
       (load (format nil "~a../lsp/setdoc.lsp" si::*system-directory*)))
 
8
  (with-open-file (st file :direction :output)
 
9
   (sloop:sloop
 
10
    for v in packages
 
11
    do (setq v (if (packagep v) (package-name v) v))
 
12
    do (sloop:sloop
 
13
        for w in-package v
 
14
        when  (setq doc (documentation w 'function))
 
15
        do (format st "F~a~%~ain ~a package:~a" w
 
16
                   (cond ((special-form-p w) "Special Form ")
 
17
                         ((functionp w) "Function ")
 
18
                         ((macro-function w) "Macro ")
 
19
                         (t ""))
 
20
                   v
 
21
                   doc)
 
22
        when (setq doc (documentation w 'variable))
 
23
        do (format st "V~a~%Variable in ~a package:~a" w v doc)
 
24
        ))))