From 7290a82b4dba4b7f42e98d8475709f4a29e46574 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Thu, 7 Feb 2013 22:16:47 +0200 Subject: [PATCH] it's print-read consistency, not read/print consistency Doesn't really matter, I guess, but let's not confuse terminology if we can avoid it. (Kudos to Zach Beane for pointing this out.) --- src/code/float.lisp | 2 +- src/code/print.lisp | 2 +- src/code/target-package.lisp | 4 ++-- tests/pathnames.impure.lisp | 2 +- tests/print.impure.lisp | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/code/float.lisp b/src/code/float.lisp index 3b5690b..5c53e87 100644 --- a/src/code/float.lisp +++ b/src/code/float.lisp @@ -630,7 +630,7 @@ (frob %long-float long-float)) ;;; Convert a ratio to a float. We avoid any rounding error by doing an -;;; integer division. Accuracy is important to preserve read/print +;;; integer division. Accuracy is important to preserve print-read ;;; consistency, since this is ultimately how the reader reads a float. We ;;; scale the numerator by a power of two until the division results in the ;;; desired number of fraction bits, then do round-to-nearest. diff --git a/src/code/print.lisp b/src/code/print.lisp index f17f4f6..c86aee4 100644 --- a/src/code/print.lisp +++ b/src/code/print.lisp @@ -606,7 +606,7 @@ variable: an unreadable object representing the error is printed instead.") ;; be qualified. This can happen if the symbol has been ;; inherited from a package other than its home package. ;; - ;; To preserve read/print consistency, use the local nickname if + ;; To preserve print-read consistency, use the local nickname if ;; one exists. (unless (and accessible (eq symbol object)) (let ((prefix (or (car (rassoc package (package-%local-nicknames current))) diff --git a/src/code/target-package.lisp b/src/code/target-package.lisp index 6a56f8e..312cb6e 100644 --- a/src/code/target-package.lisp +++ b/src/code/target-package.lisp @@ -353,7 +353,7 @@ the reader. When printing a package prefix for a symbol with a package local nickname, the local nickname is used instead of the real name in order to preserve -read/print consistency. +print-read consistency. See also: ADD-PACKAGE-LOCAL-NICKNAME, PACKAGE-LOCALLY-NICKNAMED-BY, REMOVE-PACKAGE-LOCAL-NICKNAME, and the DEFPACKAGE option :LOCAL-NICKNAMES. @@ -394,7 +394,7 @@ reader. When printing a package prefix for a symbol with a package local nickname, local nickname is used instead of the real name in order to preserve -read/print consistency. +print-read consistency. See also: PACKAGE-LOCAL-NICKNAMES, PACKAGE-LOCALLY-NICKNAMED-BY, REMOVE-PACKAGE-LOCAL-NICKNAME, and the DEFPACKAGE option :LOCAL-NICKNAMES. diff --git a/tests/pathnames.impure.lisp b/tests/pathnames.impure.lisp index e7bee8c..f675a8e 100644 --- a/tests/pathnames.impure.lisp +++ b/tests/pathnames.impure.lisp @@ -323,7 +323,7 @@ (assert (raises-error? (merge-pathnames (make-string-output-stream)) type-error))) -;;; ensure read/print consistency (or print-not-readable-error) on +;;; ensure print-read consistency (or print-not-readable-error) on ;;; pathnames: (with-test (:name :print/read-consistency :fails-on :win32) (let ((pathnames (list diff --git a/tests/print.impure.lisp b/tests/print.impure.lisp index 302fb6e..3464c1c 100644 --- a/tests/print.impure.lisp +++ b/tests/print.impure.lisp @@ -514,7 +514,7 @@ (assert (string= (format nil "~E" 0.01) "1.e-2")) (assert (string= (format nil "~G" 0.01) "1.00e-2"))) -(with-test (:name (:fp-read/print-consistency single-float)) +(with-test (:name (:fp-print-read-consistency single-float)) (let ((*random-state* (make-random-state t)) (oops)) (loop for f = most-positive-single-float then (/ f 2.0) @@ -532,12 +532,12 @@ (push fr oops) (return)))) (when oops - (error "FP read/print inconsistencies:~%~:{ ~S => ~S~%~}" + (error "FP print-read inconsistencies:~%~:{ ~S => ~S~%~}" (mapcar (lambda (f) (list f (read-from-string (prin1-to-string f)))) oops))))) -(with-test (:name (:fp-read/print-consistency double-float)) +(with-test (:name (:fp-print-read-consistency double-float)) (let ((*random-state* (make-random-state t)) (oops)) ;; FIXME skipping denormalized floats due to bug 793774. @@ -558,7 +558,7 @@ (push fr oops) (return))))) (when oops - (error "FP read/print inconsistencies:~%~:{ ~S => ~S~%~}" + (error "FP print-read inconsistencies:~%~:{ ~S => ~S~%~}" (mapcar (lambda (f) (list f (read-from-string (prin1-to-string f)))) oops))))) -- 1.7.10.4