X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fpprint.lisp;h=5c1a353696e86d5dea380bfbea4052c5991fb786;hb=4ba392170e98744f0ef0b8e08a5d42b988f1d0c9;hp=f5428786c00f5bac79d83a541258fc2293f1482b;hpb=9ebf496afbad179facaa8db5d45e5a807b1c002c;p=sbcl.git diff --git a/src/code/pprint.lisp b/src/code/pprint.lisp index f542878..5c1a353 100644 --- a/src/code/pprint.lisp +++ b/src/code/pprint.lisp @@ -75,12 +75,12 @@ ;; Buffer holding the per-line prefix active at the buffer start. ;; Indentation is included in this. The length of this is stored ;; in the logical block stack. - (prefix (make-string initial-buffer-size) :type simple-string) + (prefix (make-string initial-buffer-size) :type (simple-array character (*))) ;; Buffer holding the total remaining suffix active at the buffer start. ;; The characters are right-justified in the buffer to make it easier ;; to output the buffer. The length is stored in the logical block ;; stack. - (suffix (make-string initial-buffer-size) :type simple-string) + (suffix (make-string initial-buffer-size) :type (simple-array character (*))) ;; Queue of pending operations. When empty, HEAD=TAIL=NIL. Otherwise, ;; TAIL holds the first (oldest) cons and HEAD holds the last (newest) ;; cons. Adding things to the queue is basically (setf (cdr head) (list @@ -679,7 +679,7 @@ "Output a conditional newline to STREAM (which defaults to *STANDARD-OUTPUT*) if it is a pretty-printing stream, and do nothing if not. KIND can be one of: - :LINEAR - A line break is inserted if and only if the immediatly + :LINEAR - A line break is inserted if and only if the immediately containing section cannot be printed on one line. :MISER - Same as LINEAR, but only if ``miser-style'' is in effect. (See *PRINT-MISER-WIDTH*.) @@ -691,7 +691,7 @@ line and miser-style is in effect. :MANDATORY - A line break is always inserted. When a line break is inserted by any type of conditional newline, any - blanks that immediately precede the conditional newline are ommitted + blanks that immediately precede the conditional newline are omitted 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) @@ -1218,6 +1218,8 @@ line break." (output-object (pprint-pop) stream) (pprint-exit-if-list-exhausted) (write-char #\space stream) + (unless (listp (cdr list)) + (write-string ". " stream)) (pprint-newline :miser stream) (pprint-logical-block (stream (cdr list) :prefix "" :suffix "") (loop