[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#53260: char-syntax differs in interpreter and bytecode
From: |
Stefan Monnier |
Subject: |
bug#53260: char-syntax differs in interpreter and bytecode |
Date: |
Sat, 15 Jan 2022 09:46:30 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Lars Ingebrigtsen [2022-01-15 09:36:16] wrote:
> Mattias Engdegård <mattiase@acm.org> writes:
>> Fchar_syntax and the bytecode Bchar_syntax differ:
>> Fchar_syntax calls SETUP_BUFFER_SYNTAX_TABLE. Bchar_syntax does not.
>> Bchar_syntax converts arguments to multibyte. Fchar_syntax does not.
> [...]
>> And, most importantly, what would be the correct code?
> Hm. Perhaps Stefan has an opinion; added to the CCs.
My past opinion is in its docstring:
If you’re trying to determine the syntax of characters in the buffer,
this is probably the wrong function to use, because it can’t take
‘syntax-table’ text properties into account. Consider using
‘syntax-after’ instead.
The "can't" is because `char-syntax` doesn't know where the char comes from.
>> (I suppose char-syntax is rare enough that we could call Fchar_syntax
>> from Bchar_syntax and thus avoid any future divergence.)
> Used 172 times in-core, which isn't that rare...
I think he meant "rare" w.r.t dynamic count rather than static count.
Stefan
- bug#53260: char-syntax differs in interpreter and bytecode, Mattias Engdegård, 2022/01/14
- bug#53260: char-syntax differs in interpreter and bytecode, Lars Ingebrigtsen, 2022/01/15
- bug#53260: char-syntax differs in interpreter and bytecode,
Stefan Monnier <=
- bug#53260: char-syntax differs in interpreter and bytecode, Mattias Engdegård, 2022/01/15
- bug#53260: char-syntax differs in interpreter and bytecode, Eli Zaretskii, 2022/01/15
- bug#53260: char-syntax differs in interpreter and bytecode, Stefan Monnier, 2022/01/15
- bug#53260: char-syntax differs in interpreter and bytecode [PATCH], Mattias Engdegård, 2022/01/16
- bug#53260: char-syntax differs in interpreter and bytecode [PATCH], Lars Ingebrigtsen, 2022/01/20
- bug#53260: char-syntax differs in interpreter and bytecode [PATCH], Mattias Engdegård, 2022/01/20