[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70988: (read FUNCTION) uses Latin-1 [PATCH]
From: |
Mattias Engdegård |
Subject: |
bug#70988: (read FUNCTION) uses Latin-1 [PATCH] |
Date: |
Fri, 17 May 2024 19:08:15 +0200 |
17 maj 2024 kl. 12.45 skrev Eli Zaretskii <eliz@gnu.org>:
>>>>> Is it an accident that the code does the same only _after_ the call to
>>>>> readbyte?
>>>>
>>>> Yes, I have no reason to believe otherwise.
>>>
>>> To me, it actually looks as done on purpose.
>>
>> You could very well be right about that. What I meant is that the order
>> doesn't matter at all.
>
> Doesn't it affect what the readbyte call does?
No -- the `*multibyte = ...` assignment is just an extra return value, which
indicates whether the returned values come from a unibyte or multibyte source.
For any given source (READCHARFUN, in the terminology of lread.c), the
characters will all be unibyte or multibyte, so this returned `multibyte` flag
will typically only be used once by the caller and saved for future reference.
But you are right to question it because lread.c is a royal mess and many
changes have not been made in a clean way. It is unclear whether it's worth
returning the `multibyte` flag at all; it's only used in special cases.