From: Chris Hanson Date: Wed, 6 Mar 1991 23:03:37 +0000 (+0000) Subject: Don't show hash number when REPL value is an interned symbol. X-Git-Tag: 20090517-FFI~10875 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=1d8477836b3a3d1613ae084f3778f6a34a608b10;p=mit-scheme.git Don't show hash number when REPL value is an interned symbol. --- diff --git a/v7/src/runtime/emacs.scm b/v7/src/runtime/emacs.scm index 94b45c49c..c11fe7fa2 100644 --- a/v7/src/runtime/emacs.scm +++ b/v7/src/runtime/emacs.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/emacs.scm,v 14.7 1991/02/15 18:05:04 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/emacs.scm,v 14.8 1991/03/06 23:03:24 cph Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -87,9 +87,7 @@ MIT in each case. |# (repl-history/record! (repl/printer-history repl) object) (cond ((undefined-value? object) (transmit-signal-with-argument #\v "")) - ((object-non-pointer? object) - (transmit-signal-with-argument #\v (object->string object))) - (else + ((repl-write/show-hash? object) ;; The #\P command used to do something useful, but now ;; it just sets the Emacs variable `xscheme-prompt' to ;; its string argument. We use this to advantage here. @@ -97,7 +95,9 @@ MIT in each case. |# (emacs-eval "(xscheme-write-message-1 xscheme-prompt (format \";Value " (number->string (object-hash object)) - ": %s\" xscheme-prompt))")))) + ": %s\" xscheme-prompt))")) + (else + (transmit-signal-with-argument #\v (object->string object))))) (normal/repl-write repl object))) (define (emacs/cmdl-message cmdl string) diff --git a/v7/src/runtime/rep.scm b/v7/src/runtime/rep.scm index 891400879..c32d66ea1 100644 --- a/v7/src/runtime/rep.scm +++ b/v7/src/runtime/rep.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/rep.scm,v 14.17 1991/02/15 18:06:46 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/rep.scm,v 14.18 1991/03/06 23:02:54 cph Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -518,12 +518,16 @@ MIT in each case. |# (write-string "\n;No value" output-port) (begin (write-string "\n;Value" output-port) - (if (object-pointer? object) + (if (repl-write/show-hash? object) (begin (write-string " " output-port) (write (object-hash object) output-port))) (write-string ": " output-port) (write object output-port)))))) + +(define (repl-write/show-hash? object) + (and (object-pointer? object) + (not (interned-symbol? object)))) ;;;; History diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 5d45e75e2..b5e525b1d 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.92 1991/03/06 05:14:23 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/runtime.pkg,v 14.93 1991/03/06 23:03:37 cph Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -1708,7 +1708,8 @@ MIT in each case. |# hook/read-command-char hook/repl-environment hook/repl-read - hook/repl-write) + hook/repl-write + repl-write/show-hash?) (export (runtime debugger-command-loop) hook/repl-environment) (initialization (initialize-package!))) diff --git a/v8/src/runtime/runtime.pkg b/v8/src/runtime/runtime.pkg index 829562e56..3cb0f3948 100644 --- a/v8/src/runtime/runtime.pkg +++ b/v8/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.92 1991/03/06 05:14:23 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/runtime.pkg,v 14.93 1991/03/06 23:03:37 cph Exp $ Copyright (c) 1988-91 Massachusetts Institute of Technology @@ -1708,7 +1708,8 @@ MIT in each case. |# hook/read-command-char hook/repl-environment hook/repl-read - hook/repl-write) + hook/repl-write + repl-write/show-hash?) (export (runtime debugger-command-loop) hook/repl-environment) (initialization (initialize-package!)))