From: Henry M. Wu Date: Wed, 22 Apr 1992 21:03:33 +0000 (+0000) Subject: Changed display type parsing for DOS. X-Git-Tag: 20090517-FFI~9463 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=8df5fe115772ed3018021dbcfca4a2b8b181db7b;p=mit-scheme.git Changed display type parsing for DOS. --- diff --git a/v7/src/edwin/display.scm b/v7/src/edwin/display.scm index 45fe57d6f..9dd696177 100644 --- a/v7/src/edwin/display.scm +++ b/v7/src/edwin/display.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/display.scm,v 1.4 1991/03/11 01:14:06 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/display.scm,v 1.5 1992/04/22 21:03:33 mhwu Exp $ ;;; ;;; Copyright (c) 1989-91 Massachusetts Institute of Technology ;;; @@ -107,11 +107,11 @@ (define (editor-display-types) (list-transform-positive display-types display-type/available?)) -(define (name->display-type name) +(define (name->display-type name fail?) (let ((display-type (list-search-positive display-types (lambda (display-type) (eq? name (display-type/name display-type)))))) - (if (not display-type) + (if (and (not display-type) fail?) (error "Unknown display-type name" name)) display-type)) \ No newline at end of file diff --git a/v7/src/edwin/editor.scm b/v7/src/edwin/editor.scm index d4ad59d92..1c01dd185 100644 --- a/v7/src/edwin/editor.scm +++ b/v7/src/edwin/editor.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/editor.scm,v 1.220 1992/04/07 08:38:33 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/editor.scm,v 1.221 1992/04/22 21:03:05 mhwu Exp $ ;;; ;;; Copyright (c) 1986, 1989-92 Massachusetts Institute of Technology ;;; @@ -121,7 +121,7 @@ unspecific) (define create-editor-args - (list false)) + '()) (define (create-editor . args) (let ((args @@ -138,16 +138,23 @@ (initialize-inferior-repls!) (set! edwin-editor (make-editor "Edwin" - (let ((name (car args))) - (cond (name - (name->display-type name)) - ((display-type/available? console-display-type) - console-display-type) - ((display-type/available? x-display-type) - x-display-type) - (else - (error "can't find usable display type")))) - (cdr args))) + (let ((name (and (not (null? args)) + (car args)))) + (if name + (name->display-type name true) + (let loop ((display-type-names '(CONSOLE X))) + (if (null? display-type-names) + (error "can't find usable display type") + (let ((next (name->display-type + (car display-type-names) + false))) + (if (and next + (display-type/available? next)) + next + (loop (cdr display-type-names)))))))) + (if (null? args) + '() + (cdr args)))) (set! edwin-initialization (lambda () (set! edwin-initialization false)