From: Chris Hanson Date: Thu, 31 Jul 2003 02:33:46 +0000 (+0000) Subject: Eliminate use of WRITE on symbols when output isn't intended for READ. X-Git-Tag: 20090517-FFI~1839 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=d40b4f88f8b978716a8c89b31dd2e19f0394a13a;p=mit-scheme.git Eliminate use of WRITE on symbols when output isn't intended for READ. --- diff --git a/v7/src/edwin/hlpcom.scm b/v7/src/edwin/hlpcom.scm index bdbf12214..a65209b65 100644 --- a/v7/src/edwin/hlpcom.scm +++ b/v7/src/edwin/hlpcom.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: hlpcom.scm,v 1.126 2003/02/14 18:28:12 cph Exp $ +$Id: hlpcom.scm,v 1.127 2003/07/31 02:33:01 cph Exp $ Copyright 1986,1989,1990,1991,1993,1998 Massachusetts Institute of Technology Copyright 2000,2002,2003 Massachusetts Institute of Technology @@ -251,7 +251,7 @@ If you want VALUE to be a string, you must surround it with doublequotes." (define (mode-apropos regexp) (for-each (lambda (mode) - (write (mode-name mode)) + (write-string (symbol-name (mode-name mode))) (newline) (print-short-description "Mode" (mode-description mode))) (string-table-apropos editor-modes regexp))) diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm index ae9565fb0..ba80d949e 100644 --- a/v7/src/imail/imail-imap.scm +++ b/v7/src/imail/imail-imap.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: imail-imap.scm,v 1.198 2003/02/14 18:28:14 cph Exp $ +$Id: imail-imap.scm,v 1.199 2003/07/31 02:33:46 cph Exp $ Copyright 1999,2000,2001,2003 Massachusetts Institute of Technology @@ -2151,7 +2151,7 @@ USA. (flush-output imap-trace-port))) (imap-transcript-write-string tag port) (imap-transcript-write-char #\space port) - (imap-transcript-write command port) + (imap-transcript-write-string (symbol-name command) port) (for-each (lambda (argument) (if argument (begin @@ -2166,9 +2166,10 @@ USA. (define (imap:send-command-argument connection tag argument) (let ((port (imap-connection-port connection))) (let loop ((argument argument)) - (cond ((or (symbol? argument) - (exact-nonnegative-integer? argument)) + (cond ((exact-nonnegative-integer? argument) (imap-transcript-write argument port)) + ((symbol? argument) + (imap-transcript-write-string (symbol-name argument) port)) ((and (pair? argument) (eq? (car argument) 'QUOTE) (pair? (cdr argument)) diff --git a/v7/src/runtime/dbgutl.scm b/v7/src/runtime/dbgutl.scm index 40125b7f4..6971d997c 100644 --- a/v7/src/runtime/dbgutl.scm +++ b/v7/src/runtime/dbgutl.scm @@ -1,8 +1,9 @@ #| -*-Scheme-*- -$Id: dbgutl.scm,v 14.23 2003/02/14 18:28:32 cph Exp $ +$Id: dbgutl.scm,v 14.24 2003/07/31 02:32:02 cph Exp $ -Copyright (c) 1988-2002 Massachusetts Institute of Technology +Copyright 1988,1989,1990,1991,1992,2001 Massachusetts Institute of Technology +Copyright 2002,2003 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -51,7 +52,12 @@ USA. (debugger-failure port "No procedure for this environment.")))) (define (write-dbg-name name port) - (if (string? name) (write-string name port) (write name port))) + (cond ((string? name) + (write-string name port)) + ((interned-symbol? name) + (write-string (symbol-name name) port)) + (else + (write name port)))) (define (write-dbg-upcase-name name port) (cond ((string? name)