Subject: bug#18909: 24.4.50; unexpected (prin1-to-string '(foo "bar") t)

From: Andreas Schwab <[email-masked]>
Date: Fri, 31 Oct 2014 20:21:00 +0100

Oleh <[email-masked]> writes:

> To my surprise,
>
>     (prin1-to-string '(foo "bar") t)
>
> evaluates as "(foo bar)". This seems like a bug to me, since it doesn't
> conform to the doc (it's not the printed representation of the OBJECT any more).

"This function outputs quoting characters when necessary to make output
that `read' can handle, whenever possible, unless the optional second
argument NOESCAPE is non-nil."

Escaping is about _all_ quotation, not only the backslash.  It's the
difference between prin1 and princ.

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."