diff options
author | Robin Templeton <[email protected]> | 2014-09-22 10:40:59 -0400 |
---|---|---|
committer | Robin Templeton <[email protected]> | 2015-04-20 00:29:03 -0400 |
commit | 5fdac58a86e83e2d4bd272d7dd4959c3ef2100bd (patch) | |
tree | 183a6090345943dea6d951a6a4aed2b9a557882c /src/print.c | |
parent | fa4d389029c1a53dbd89ae99638c7b3a4e1b6f7b (diff) |
print scheme objects unreadably
* src/lread.c (print_object): Print Scheme objects unreadably, instead
of printing them in Scheme syntax. Thanks to Taylan Ulrich
Bayırlı/Kammer <[email protected]> for the report.
Diffstat (limited to 'src/print.c')
-rw-r--r-- | src/print.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/print.c b/src/print.c index 05a5dd70ae..a8bad353d0 100644 --- a/src/print.c +++ b/src/print.c @@ -2142,11 +2142,16 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) case Lisp_Other: { + static SCM prefix; SCM port = scm_open_output_string (); + if (SCM_UNLIKELY (!prefix)) + prefix = scm_from_latin1_string ("#<scheme "); + scm_display (prefix, port); if (escapeflag) scm_display (obj, port); else scm_write (obj, port); + scm_display (SCM_MAKE_CHAR ('>'), port); strout (scm_to_locale_string (scm_get_output_string (port)), -1, -1, printcharfun); scm_close_port (port); |