#| -*-Scheme-*-
-$Id: comman.scm,v 1.83 2000/02/25 20:24:15 cph Exp $
+$Id: comman.scm,v 1.84 2000/06/15 00:43:40 cph Exp $
Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology
(define (command-description command)
(let ((desc (command-%description command)))
- (if (string? desc)
+ (if (description? desc)
desc
- (let ((new (->doc-string (symbol->string (command-name command))
- desc)))
+ (let ((new
+ (->doc-string (symbol->string (command-name command)) desc)))
(if new
(set-command-%description! command new))
new))))
(define (variable-description variable)
(let ((desc (variable-%description variable)))
- (if (string? desc)
+ (if (description? desc)
desc
- (let ((new (->doc-string (symbol->string (variable-name variable))
- desc)))
+ (let ((new
+ (->doc-string (symbol->string (variable-name variable)) desc)))
(if new
(set-variable-%description! variable new))
new))))
#| -*-Scheme-*-
-$Id: docstr.scm,v 1.3 1999/01/02 06:11:34 cph Exp $
+$Id: docstr.scm,v 1.4 2000/06/15 00:43:26 cph Exp $
-Copyright (c) 1993-1999 Massachusetts Institute of Technology
+Copyright (c) 1993-2000 Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
(declare (usual-integrations))
\f
-(define *external-doc-strings?* true)
-(define *external-doc-strings-file* false)
-(define *doc-strings* false)
+(define *external-doc-strings?* #t)
+(define *external-doc-strings-file* #f)
+(define *doc-strings* #f)
(define *doc-string-posn* 0)
-(define *doc-string-channel* false)
-(define *doc-string-buffer* false)
+(define *doc-string-channel* #f)
+(define *doc-string-buffer* #f)
(define (doc-string->posn name str)
- (if (not *external-doc-strings?*)
- str
+ (if (and *external-doc-strings?* (string? str))
(let ((nlen (string-length name))
(dslen (string-length str))
(slen (if (not *doc-strings*)
(string-set! doc-strings (fix:- end 2) #\Newline)
(string-set! doc-strings (fix:- end 1) #\Newline)
(set! *doc-string-posn* end)
- posn)))))
+ posn)))
+ str))
\f
(define-integrable doc-string-buffer-length 512)
output
(lambda (port)
(output-port/write-string port *doc-strings*)))
- (set! *external-doc-strings?* false)
+ (set! *external-doc-strings?* #f)
(set! *doc-string-posn* 0)
- (set! *doc-strings* false)
+ (set! *doc-strings* #f)
unspecific)
(define (guarantee-doc-string-state)
unspecific))))))
(add-event-receiver! event:after-restart
- (lambda ()
- (set! *doc-string-channel* false)))
\ No newline at end of file
+ (lambda () (set! *doc-string-channel* #f)))
\ No newline at end of file
;;; -*-Scheme-*-
;;;
-;;; $Id: hlpcom.scm,v 1.118 2000/06/15 00:34:27 cph Exp $
+;;; $Id: hlpcom.scm,v 1.119 2000/06/15 00:44:08 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology
;;;
(substring string 0 index)
string))))
+(define (description? description)
+ (or (string? description)
+ (and (procedure? description)
+ (procedure-arity-valid? description 0))))
+
(define (description->string description)
(cond ((string? description) description)
((procedure? description) (description))
;;; -*-Scheme-*-
;;;
-;;; $Id: modes.scm,v 1.32 2000/02/25 20:24:19 cph Exp $
+;;; $Id: modes.scm,v 1.33 2000/06/15 00:43:51 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology
;;;
(define (mode-description mode)
(let ((desc (mode-%description mode)))
- (if (string? desc)
+ (if (description? desc)
desc
(let ((new (->doc-string (symbol->string (mode-name mode)) desc)))
(if new