[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCHES] Keyword args for file openers; coding scan off by default
From: |
Ludovic Courtès |
Subject: |
Re: [PATCHES] Keyword args for file openers; coding scan off by default |
Date: |
Sun, 07 Apr 2013 21:18:04 +0200 |
User-agent: |
Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.3 (gnu/linux) |
Mark H Weaver <address@hidden> skribis:
> address@hidden (Ludovic Courtès) writes:
>
>> Looks good.
>>
>> Minor comments:
[...]
>>> +Unless binary mode is requested, the character encoding of the new port
>>> +is determined as follows: First, if @var{guess-encoding} is true,
>>> +heuristics will be used to guess the encoding of the file. If it is
>>
>> “heuristics” is vague. I’d prefer “the ‘file-encoding’ procedure is
>> called to check for Emacs-style coding declarations (@pxref{Character
>> Encoding of Source Files})”. Should BOMs also be mentioned?
>
> Makes sense. Following our discussion on IRC, the patch below has the
> following wording:
>
> Unless binary mode is requested, the character encoding of the new
> port is determined as follows: First, if @var{guess-encoding} is true,
> the @code{file-encoding} procedure is used to guess the encoding of
> the file (@pxref{Character Encoding of Source Files}). [...]
Perfect.
> I left out the "Emacs-style coding declarations" language here, because
> I want to leave open the possibility of adding additional heuristics to
> 'file-encoding' in the future.
Good idea.
[...]
> From 3e9890ea809bd77a36c1005935b73cf4ca18e691 Mon Sep 17 00:00:00 2001
> From: Mark H Weaver <address@hidden>
> Date: Sun, 7 Apr 2013 12:07:33 -0400
> Subject: [PATCH 2/2] Clarify 'file-encoding' docs: heuristics may be improved
> later.
>
> * doc/ref/api-evaluation.texi (Character Encoding of Source Files):
> Mention UTF-8 as another common encoding used for Scheme source files,
> and that it is used by default. Change the description to leave open
> the possibility of adding additional heuristics in the future.
> Mention that if the coding declaration is in a #!-style block comment,
> it must be the first such comment in the file. Mention the
> '#:guess-encoding' keyword argument.
Looks good too.
Please push both!
Ludo’.