X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fprint.lisp;h=fd90bd2044b04b1e7358ac52c0f32c3561023a0a;hb=f741a144c386acdb82cac2e3352abab7cff65f1d;hp=276ce951ce3621f5b3d61506de0a484e2211c519;hpb=d61819dea7797e94d996efc48883261392ec63ba;p=sbcl.git diff --git a/src/code/print.lisp b/src/code/print.lisp index 276ce95..fd90bd2 100644 --- a/src/code/print.lisp +++ b/src/code/print.lisp @@ -193,9 +193,11 @@ (push (list variable value) bind))) (unless (assoc 'stream bind) (push (list 'stream '*standard-output*) bind)) - `(let ,(nreverse bind) - ,@(when ignore `((declare (ignore ,@ignore)))) - (output-object ,object stream)))) + (once-only ((object object)) + `(let ,(nreverse bind) + ,@(when ignore `((declare (ignore ,@ignore)))) + (output-object ,object (out-synonym-of stream)) + ,object)))) (defun prin1 (object &optional stream) #!+sb-doc @@ -275,9 +277,10 @@ (push variable ignore)) (push (list variable value) bind))) (if bind - `(let ,(nreverse bind) - ,@(when ignore `((declare (ignore ,@ignore)))) - (stringify-object ,object)) + (once-only ((object object)) + `(let ,(nreverse bind) + ,@(when ignore `((declare (ignore ,@ignore)))) + (stringify-object ,object))) `(stringify-object ,object)))) (defun prin1-to-string (object) @@ -314,9 +317,9 @@ (when type (write (type-of object) :stream stream :circle nil :level nil :length nil) - (write-char #\space stream)) + (write-char #\space stream) + (pprint-newline :fill stream)) (when body - (pprint-newline :fill stream) (funcall body)) (when identity (when (or body (not type))