Mark H Weaver <m...@netris.org> skribis: > l...@gnu.org (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 <m...@netris.org> > 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’.