bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Andreas Schwab
Subject: bug#18909: 24.4.50; unexpected (prin1-to-string '(foo "bar") t)
Date: Fri, 31 Oct 2014 20:21:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Oleh <ohwoeowho@gmail.com> 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, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]