Willem Broekema; launchpad bug lp#489698).
* bug fix: some minor code rearrangements to reenable warning-free building
from CMUCL (reported by xme@gmx.net; launchpad bug lp#491104)
+ * bug fix: PRINT-OBJECT for clos instances respects the right margin when
+ pretty printing
changes in sbcl-1.0.33 relative to sbcl-1.0.32:
* new port: support added for x86-64 NetBSD. (thanks to Aymeric Vincent)
:level nil :length nil)
(write-char #\space stream))
(when body
+ (pprint-newline :fill stream)
(funcall body))
(when identity
(when (or body (not type))
(write-char #\space stream))
+ (pprint-newline :fill stream)
(write-char #\{ stream)
(write (get-lisp-obj-address object) :stream stream
:radix nil :base 16)
(pprint-logical-block (stream nil :prefix "#<" :suffix ">")
(print-description)))
(t
- (write-string "#<" stream)
- (print-description)
- (write-char #\> stream))))
+ (write-string "#<" stream)
+ (print-description)
+ (write-char #\> stream))))
nil)
\f
;;;; OUTPUT-OBJECT -- the main entry point
(fmakunbound 'print-object)
(defgeneric print-object (object stream))
(defmethod print-object ((x t) stream)
- (print-unreadable-object (x stream :type t :identity t))))
+ (if *print-pretty*
+ (pprint-logical-block (stream nil)
+ (print-unreadable-object (x stream :type t :identity t)))
+ (print-unreadable-object (x stream :type t :identity t)))))
(/show0 "done replacing placeholder PRINT-OBJECT with DEFGENERIC")
\f
;;;; a hook called by the printer to take care of dispatching to PRINT-OBJECT
(let ((*print-pretty* t))
(assert (string= (princ-to-string 'bar) "BAR"))))))
+;;; bug-lp#488979
+
+(defclass a-class-name () ())
+
+(assert (find #\Newline
+ (let ((*print-pretty* t)
+ (*print-right-margin* 10))
+ (format nil "~A" (make-instance 'a-class-name)))
+ :test #'char=))
+
+(assert (not (find #\Newline
+ (let ((*print-pretty* nil)
+ (*print-right-margin* 10))
+ (format nil "~A" (make-instance 'a-class-name)))
+ :test #'char=)))
+
;;; success
;;; 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".)
-"1.0.33.5"
+"1.0.33.6"