Subject: bug#5440: 23.1; buffer-file-format encoding temp buffers not reentrant

From: Andrew Hyatt <[email-masked]>
Date: Mon, 25 Jul 2016 21:13:14 -0400

Eli Zaretskii <[email-masked]> writes:

>> From: Andrew Hyatt <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Mon, 25 Jul 2016 00:07:50 -0400
>> 
>> diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
>> index f3650a4..5763380 100644
>> --- a/doc/lispref/files.texi
>> +++ b/doc/lispref/files.texi
>
> Thanks.  A couple of comments:
>
>> @@ -3238,7 +3238,9 @@ Format Conversion Round-Trip
>>  
>>  One responsibility of @var{from-fn} is to make sure that the beginning
>>  of the file no longer matches @var{regexp}.  Otherwise it is likely to
>> -get called again.
>> +get called again.  Also, @var{from-fn} must not involve other buffers or
>> +files other than the one being decoded
>
> One of these 2 "others" should be deleted, I think.

Done

>
>>                                         or else formatting may happen
>> +during formatting, leading to incorrect results.
>
> I would say something like
>
>   otherwise the internal buffer used for formatting might be
>   overwritten.

Done

>
>> +@var{to-fn} must not involve other buffers or files other than the one
>> +being encoded, or else formatting may happen during formatting,
>> +leading to incorrect results.
>
> Same here.

Done.

Thanks for the suggestions.  I'll submit this and close out the bug.