From 71c08e366f91503937d60967a2f07f845962a9d8 Mon Sep 17 00:00:00 2001 From: Douglas Katzman Date: Wed, 18 Mar 2015 01:38:40 -0400 Subject: [PATCH] A few OAOO issues in pprint --- package-data-list.lisp-expr | 1 + src/code/pprint.lisp | 21 ++++++--------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/package-data-list.lisp-expr b/package-data-list.lisp-expr index 6bfa724b2..c00d0157c 100644 --- a/package-data-list.lisp-expr +++ b/package-data-list.lisp-expr @@ -1275,6 +1275,7 @@ possibly temporarily, because it might be used internally." "INTERN*" "WITH-FAST-READ-BYTE" "PREPARE-FOR-FAST-READ-CHAR" + "OUT-SYNONYM-OF" ;; hackery to help set up for cold init "!BEGIN-COLLECTING-COLD-INIT-FORMS" diff --git a/src/code/pprint.lisp b/src/code/pprint.lisp index af49ca782..c85fab871 100644 --- a/src/code/pprint.lisp +++ b/src/code/pprint.lisp @@ -706,12 +706,9 @@ from the output and indentation is introduced at the beginning of the next line. (See PPRINT-INDENT.)" (declare (type (member :linear :miser :fill :mandatory) kind) - (type (or stream (member t nil)) stream) + (type stream-designator stream) (values null)) - (let ((stream (case stream - ((t) *terminal-io*) - ((nil) *standard-output*) - (t stream)))) + (let ((stream (out-synonym-of stream))) (when (print-pretty-on-stream-p stream) (enqueue-newline stream kind))) nil) @@ -733,12 +730,9 @@ The new indentation value does not take effect until the following line break." (declare (type (member :block :current) relative-to) (type real n) - (type (or stream (member t nil)) stream) + (type stream-designator stream) (values null)) - (let ((stream (case stream - ((t) *terminal-io*) - ((nil) *standard-output*) - (t stream)))) + (let ((stream (out-synonym-of stream))) (when (print-pretty-on-stream-p stream) (enqueue-indent stream relative-to (truncate n)))) nil) @@ -758,12 +752,9 @@ line break." of the current section, not the start of the line." (declare (type (member :line :section :line-relative :section-relative) kind) (type unsigned-byte colnum colinc) - (type (or stream (member t nil)) stream) + (type stream-designator stream) (values null)) - (let ((stream (case stream - ((t) *terminal-io*) - ((nil) *standard-output*) - (t stream)))) + (let ((stream (out-synonym-of stream))) (when (print-pretty-on-stream-p stream) (enqueue-tab stream kind colnum colinc))) nil) -- 2.11.4.GIT