X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Fpp-backq.lisp;h=9b2ff78bc72b2f8c81650ce04b4baa773efd73f2;hb=4ed3f0d08c3a57a6762018d9622f253ab9d0f2b6;hp=2552673d28b87c442255ca63e3c573ce3ec2019d;hpb=e0814eee6f6dea52db010b45a330100f2fe65832;p=sbcl.git diff --git a/src/code/pp-backq.lisp b/src/code/pp-backq.lisp index 2552673..9b2ff78 100644 --- a/src/code/pp-backq.lisp +++ b/src/code/pp-backq.lisp @@ -78,7 +78,18 @@ (princ ",@" stream)) (backq-comma-dot (princ ",." stream))) - (write (cadr form) :stream stream)) + ;; Ha! an example of where the per-process specials for stream + ;; attributes rather than per-stream actually makes life easier. + ;; Since all of the attributes are shared in the dynamic state, we + ;; can do... -- CSR, 2003-09-30 + (let ((output (with-output-to-string (s) + (write (cadr form) :stream s)))) + (unless (= (length output) 0) + (when (and (eql (car form) 'backq-comma) + (or (char= (char output 0) #\.) + (char= (char output 0) #\@))) + (write-char #\Space stream)) + (write-sequence output stream)))) ;;; This is called by !PPRINT-COLD-INIT, fairly late, because ;;; SET-PPRINT-DISPATCH doesn't work until the compiler works.