From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.devel Subject: Re: how authors of add-on modules can package documentation Date: Tue, 02 Apr 2002 21:29:14 -0800 Sender: guile-devel-admin@gnu.org Message-ID: References: <15508.6444.70455.739266@winona.neilvandyke.org> <87zo17f8pr.fsf@tyrell.bad-people-of-the-future.san-francisco.ca.us> <877koa3a2v.fsf@gaff.bad-people-of-the-future.san-francisco.ca.us> Reply-To: ttn@glug.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1017811997 17196 127.0.0.1 (3 Apr 2002 05:33:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 3 Apr 2002 05:33:17 +0000 (UTC) Cc: guile-devel@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16sdOX-0004T8-00 for ; Wed, 03 Apr 2002 07:33:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16sdOJ-0006kc-00; Wed, 03 Apr 2002 00:33:03 -0500 Original-Received: from ca-crlsbd-u4-c4c-174.crlsca.adelphia.net ([68.66.186.174] helo=giblet) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16sdNb-0006OH-00 for ; Wed, 03 Apr 2002 00:32:19 -0500 Original-Received: from ttn by giblet with local (Exim 3.33 #1 (Debian)) id 16sdKc-0002S5-00; Tue, 02 Apr 2002 21:29:14 -0800 Original-To: evan@glug.org Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:280 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:280 From: Evan Prodromou Date: Sun, 17 Mar 2002 18:04:40 -0800 OK, but as I mentioned before, there doesn't seem to be much provision for doc'ing variables, classes, methods, etc. with docstrings. below is (ttn defvar). is this what you mean? thi ________________________________ ;;; ID: $Id: defvar.scm,v 1.3 2000/09/11 01:13:41 ttn Rel $ ;;; ;;; Description: Provide `defvar' and some doc-access procedures. (define-module (ttn defvar)) (defmacro defvar (name value docstring) `(let ((var (make-variable ,value ',name))) (module-add! (current-module) ',name var) (set-object-property! var 'documentation ,docstring) ,value)) (define (documentation-property obj) "Return, as a string, documentation on OBJ, or #f. OBJ may be a pair of the form (MODULE . SYM), where MODULE is in list form as in `define-module', in which case MODULE is consulted instead of the current-module." (cond ((variable? obj) (object-property obj 'documentation)) ((procedure? obj) (procedure-documentation obj)) ((symbol? obj) (documentation-property (module-variable (current-module) obj))) ((pair? obj) (save-module-excursion (lambda () (set-current-module (resolve-module (car obj))) (documentation-property (cdr obj))))) (else #f))) (export defvar documentation-property) ;;; $RCSfile: defvar.scm,v $$Revision: 1.3 $ ends here _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel