* bug fix: buffered :DIRECTION :IO streams are less likely to become
confused about their position. (thanks to Adam Warner and Gerd
Moellmann)
+ * bug fix: Pretty printing backquoted forms with unquotations in the
+ argument list position of various code constructs such as LAMBDA
+ now works correctly. (reported by Paul Dietz)
* optimization: performance of string output streams is now less
poor for multiple small sequence writes.
* ASDF-INSTALL bug fix: now parses *PROXY* properly. (thanks to
"PREPARE-FOR-FAST-READ-BYTE"
"PREPARE-FOR-FAST-READ-CHAR"
+ ;; reflection of our backquote implementation that the
+ ;; pprinter needs
+ "*BACKQ-TOKENS*"
+
;; hackery to help set up for cold init
"!BEGIN-COLLECTING-COLD-INIT-FORMS"
"!COLD-INIT-FORMS"
(set-macro-character #\, #'comma-macro))
#+sb-xc-host (!backq-cold-init)
+;;; The pretty-printer needs to know about our special tokens
+(defvar *backq-tokens*
+ '(backq-comma backq-comma-at backq-comma-dot backq-list
+ backq-list* backq-append backq-nconc backq-cons backq-vector))
+
(/show0 "done with backq.lisp")
(defun pprint-lambda-list (stream lambda-list &rest noise)
(declare (ignore noise))
+ (when (and (consp lambda-list)
+ (member (car lambda-list) *backq-tokens*))
+ ;; if this thing looks like a backquoty thing, then we don't want
+ ;; to destructure it, we want to output it straight away. [ this
+ ;; is the exception to the normal processing: if we did this
+ ;; generally we would find lambda lists such as (FUNCTION FOO)
+ ;; being printed as #'FOO ] -- CSR, 2003-12-07
+ (output-object lambda-list stream)
+ (return-from pprint-lambda-list nil))
(pprint-logical-block (stream lambda-list :prefix "(" :suffix ")")
(let ((state :required)
(first t))
(write '`(, ?foo) :stream s :pretty t :readably t))
"`(,?FOO)"))
+;;; bug reported by Paul Dietz on sbcl-devel: unquoted lambda lists
+;;; were leaking the SB-IMPL::BACKQ-COMMA implementation.
+(assert (equal
+ (with-output-to-string (s)
+ (write '`(foo ,x) :stream s :pretty t :readably t))
+ "`(FOO ,X)"))
+(assert (equal
+ (with-output-to-string (s)
+ (write '`(foo ,@x) :stream s :pretty t :readably t))
+ "`(FOO ,@X)"))
+#+nil ; '`(foo ,.x) => '`(foo ,@x) apparently.
+(assert (equal
+ (with-output-to-string (s)
+ (write '`(foo ,.x) :stream s :pretty t :readably t))
+ "`(FOO ,.X)"))
+(assert (equal
+ (with-output-to-string (s)
+ (write '`(lambda ,x) :stream s :pretty t :readably t))
+ "`(LAMBDA ,X)"))
+(assert (equal
+ (with-output-to-string (s)
+ (write '`(lambda ,@x) :stream s :pretty t :readably t))
+ "`(LAMBDA ,@X)"))
+#+nil ; see above
+(assert (equal
+ (with-output-to-string (s)
+ (write '`(lambda ,.x) :stream s :pretty t :readably t))
+ "`(LAMBDA ,.X)"))
+(assert (equal
+ (with-output-to-string (s)
+ (write '`(lambda (,x)) :stream s :pretty t :readably t))
+ "`(LAMBDA (,X))"))
+\f
;;; success
(quit :unix-status 104)
;;; 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.6.31"
+"0.8.6.32"