evaluates to a string.
#| -*-Scheme-*-
-$Id: docstr.scm,v 1.4 2000/06/15 00:43:26 cph Exp $
+$Id: docstr.scm,v 1.5 2000/06/15 00:58:53 cph Exp $
Copyright (c) 1993-2000 Massachusetts Institute of Technology
unspecific))))))
(add-event-receiver! event:after-restart
- (lambda () (set! *doc-string-channel* #f)))
\ No newline at end of file
+ (lambda () (set! *doc-string-channel* #f)))
+\f
+;;;; Abstraction of help descriptions
+
+(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))
+ (else
+ (error:wrong-type-argument description "description"
+ 'DESCRIPTION->STRING))))
+
+(define (description-first-line description)
+ (let ((string (description->string description)))
+ (let ((index (string-find-next-char string #\newline)))
+ (if index
+ (substring string 0 index)
+ string))))
+
+(define (description-append . descriptions)
+ (lambda () (apply string-append (map description->string descriptions))))
\ No newline at end of file
#| -*-Scheme-*-
-$Id: edwin.ldr,v 1.71 2000/06/15 00:36:59 cph Exp $
+$Id: edwin.ldr,v 1.72 2000/06/15 00:58:55 cph Exp $
Copyright (c) 1989-2000 Massachusetts Institute of Technology
(load "simple" environment)
(load "debuge" environment)
(load "modlin" (->environment '(EDWIN MODELINE-STRING)))
- (load "hlpcom" environment)
(load "input" (->environment '(EDWIN KEYBOARD)))
(load "prompt" (->environment '(EDWIN PROMPT)))
(load "comred" (->environment '(EDWIN COMMAND-READER)))
(load "evlcom" environment)
(load "filcom" environment)
(load "fill" environment)
+ (load "hlpcom" environment)
(load "info" (->environment '(EDWIN INFO)))
(load "intmod" (->environment '(EDWIN INFERIOR-REPL)))
(load "keymap" (->environment '(EDWIN COMMAND-SUMMARY)))
;;; -*-Scheme-*-
;;;
-;;; $Id: hlpcom.scm,v 1.119 2000/06/15 00:44:08 cph Exp $
+;;; $Id: hlpcom.scm,v 1.120 2000/06/15 00:58:43 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-2000 Massachusetts Institute of Technology
;;;
", "
(loop (cdr xkeys))))))
-(define (print-variable-binding variable)
- (write-string " which is bound to: ")
- (write (variable-value variable))
- (newline))
+(define (print-variable-binding variable #!optional port)
+ (let ((port (if (default-object? port) (current-output-port) port)))
+ (write-string " which is bound to: " port)
+ (write (variable-value variable) port)
+ (newline port)))
(define (print-short-description prefix description #!optional port)
(let ((port (if (default-object? port) (current-output-port) port)))
(write-string ": " port)))
(write-description (description-first-line description) port)
(newline port)))
-
-(define (description-first-line description)
- (let ((string (description->string description)))
- (let ((index (string-find-next-char string #\newline)))
- (if index
- (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))
- (else
- (error:wrong-type-argument description "description"
- 'DESCRIPTION->STRING))))
-
-(define (description-append . descriptions)
- (lambda () (apply string-append (map description->string descriptions))))
\f
(define (substitute-command-keys description #!optional buffer)
(let* ((string (description->string description))