[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pretty-print for 1+
From: |
Ludovic Courtès |
Subject: |
Re: pretty-print for 1+ |
Date: |
Tue, 17 Sep 2013 12:02:15 +0200 |
User-agent: |
Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) |
Brian Killian <address@hidden> skribis:
> On Thu, Sep 12, 2013 at 6:04 PM, Ludovic Courtès <address@hidden> wrote:
>
>> Brian Killian <address@hidden> skribis:
>>
>> > Using guile 2.0.9 and the ice-9 pretty-print module, when I apply:
>> >
>> > (pretty-print '(1+ 1))
>> >
>> > I get:
>> >
>> > (#{1+}# 1)
>> >
>> > I was expecting:
>> >
>> > (1+ 1)
>> >
>> > Is this an issue with pretty-print or should I adjust my expectation?
>>
>> I think it’s an issue with ‘write’. Specifically,
>> ‘INITIAL_IDENTIFIER_MASK’ in print.c doesn’t quite match the syntax
>> recognized by ‘read’.
>>
>> Ludo’.
>>
>>
>>
> Thank you for the information. I'm using (+ arg 1) instead of (1+ arg) as a
> workaround.
Well note that (#{1+}# 1) is valid and equivalent to (1+ 1).
> I'm using pretty-print to format code snippets as I work through SICP,
> which is becoming tedious. Do you know of a script or tool that formats
> Scheme files using the pretty-print rules? I've switched from gedit to
> Emacs as an editor, but Emacs only seems to indent things properly, rather
> than stripping extraneous newlines and trying to fit expressions on one
> line if possible like pretty-print does.
Good question, I don’t know of any such tool.
Ludo’.