From: Taylor R Campbell Date: Sun, 24 Oct 2010 06:16:33 +0000 (+0000) Subject: Make #@n always read as a quotation of the nth hashed object. X-Git-Tag: 20101212-Gtk~29 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=4883bad5afde036fa0b73f75aa3789566a3fb7cb;p=mit-scheme.git Make #@n always read as a quotation of the nth hashed object. Previously, #@n sometimes read as the nth hashed object, and sometimes read as a quotation of it. The advantage of the old behaviour is that non-scode objects could be mentioned inside quotations with #@n. Personally, most of the time I referred to non-scode objects inside quotations with #@n was as '#@n to work around the problems this fixes: (lambda (x) x) ;Value 12: #[compound-procedure 12] (#@12 0) ;The object #[compound-procedure 12], passed as an argument to make-combination, is not an operator expression. (list 1 2 3) ;Value 18: (1 2 3) (pp #@18) ;The object 1 is not applicable. --- diff --git a/doc/ref-manual/io.texi b/doc/ref-manual/io.texi index 0f69a24ff..e2246174e 100644 --- a/doc/ref-manual/io.texi +++ b/doc/ref-manual/io.texi @@ -1183,7 +1183,7 @@ the object). Subsequently, the expression @end example @noindent -is notation for the object. +is notation for an expression evaluating to the object. If @var{procedure} is supplied, the returned method generates a slightly different external representation: diff --git a/src/runtime/parse.scm b/src/runtime/parse.scm index fe712f831..227aafd41 100644 --- a/src/runtime/parse.scm +++ b/src/runtime/parse.scm @@ -572,9 +572,7 @@ USA. ;; result of the evaluation to be the object she was referring ;; to. If the quotation isn't there, the user just gets ;; confused. - (if (scode-constant? object) - object - (make-quotation object)))) + (make-quotation object))) (define (parse-unhash object) (if (not (exact-nonnegative-integer? object))