From: Christophe Rhodes Date: Wed, 6 Oct 2004 15:31:39 +0000 (+0000) Subject: 0.8.15.9: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=dd2cc7dffe4e37177f5c8019f561130abd41d93e;p=sbcl.git 0.8.15.9: PPRINT-INDENT should take reals, not just integers, as arguments. ... make it so. ... note a possible bug in the way it's been made so. --- diff --git a/BUGS b/BUGS index 70b8d3e..0e0dfaf 100644 --- a/BUGS +++ b/BUGS @@ -1601,3 +1601,14 @@ WORKAROUND: (aref (vector x) (incf i))) (foo-x x)) => error + +349: PPRINT-INDENT rounding implementation decisions + At present, pprint-indent (and indeed the whole pretty printer) + more-or-less assumes that it's using a monospace font. That's + probably not too silly an assumption, but one piece of information + the current implementation loses is from requests to indent by a + non-integral amount. As of sbcl-0.8.15.9, the system silently + truncates the indentation to an integer at the point of request, but + maybe the non-integral value should be propagated through the + pprinter and only truncated at output? (So that indenting by 1/2 + then 3/2 would indent by two spaces, not one?) diff --git a/NEWS b/NEWS index 29cb051..7ae1f6f 100644 --- a/NEWS +++ b/NEWS @@ -14,7 +14,11 @@ changes in sbcl-0.8.16 relative to sbcl-0.8.15: * fixed some bugs revealed by Paul Dietz' test suite: ** POSITION on displaced vectors with non-zero displacement returns the right answer. - ** (SIMPLE-STRING) is a valid type specifier for sequence creators. + ** (SIMPLE-STRING) is a valid type specifier for sequence + creators. + ** *PRINT-LEVEL* handling for slotless structures is pedantically + correct. + ** PPRINT-INDENT accepts a request for an indentation of any REAL. changes in sbcl-0.8.15 relative to sbcl-0.8.14: * incompatible change: SB-INT:*BEFORE-SAVE-INITIALIZATIONS* and diff --git a/src/code/pprint.lisp b/src/code/pprint.lisp index bc3dc84..57024e6 100644 --- a/src/code/pprint.lisp +++ b/src/code/pprint.lisp @@ -689,15 +689,15 @@ #!+sb-doc "Specify the indentation to use in the current logical block if STREAM (which defaults to *STANDARD-OUTPUT*) is it is a pretty-printing stream - and do nothing if not. (See PPRINT-LOGICAL-BLOCK.) N is the indention + and do nothing if not. (See PPRINT-LOGICAL-BLOCK.) N is the indentation to use (in ems, the width of an ``m'') and RELATIVE-TO can be either: :BLOCK - Indent relative to the column the current logical block started on. :CURRENT - Indent relative to the current column. - The new indention value does not take effect until the following line + The new indentation value does not take effect until the following line break." (declare (type (member :block :current) relative-to) - (type integer n) + (type real n) (type (or stream (member t nil)) stream) (values null)) (let ((stream (case stream @@ -705,7 +705,7 @@ ((nil) *standard-output*) (t stream)))) (when (print-pretty-on-stream-p stream) - (enqueue-indent stream relative-to n))) + (enqueue-indent stream relative-to (truncate n)))) nil) (defun pprint-tab (kind colnum colinc &optional stream) diff --git a/version.lisp-expr b/version.lisp-expr index 740db47..2b2b429 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.15.8" +"0.8.15.9"