GNU bug report logs -
#41522
26.3; Narrowing can prevent syntax propertization
Previous Next
Reported by: Ikumi Keita <ikumi <at> ikumi.que.jp>
Date: Mon, 25 May 2020 08:43:02 UTC
Severity: normal
Found in version 26.3
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 41522 <at> debbugs.gnu.org (full text, mbox):
Hi!
On 25.05.2020 11:42, Ikumi Keita wrote:
> In a similar way, if a lisp function goes to the point where syntax
> propertization has not yet took place, makes narrowing and calls some
> syntax-aware function which sets `syntax-propertize--done' to a value
> inside the narrowing, a large portion of the buffer can be left without
> suitable `syntax-table' property. This can lead to incorrect result
> for not only font-lock but also syntax-aware functions such as
> `forward-comment'.
Our current stance on the matter is that, in the simple case, code
should call syntax-ppss from "widened" state. And the code which doesn't
should be fixed. Or if it really need to do that (for some reason), it
should take care to handle any undesired sife-effects itself.
See the definition of syntax-ppss-wide, which contains caches for both
narrowed and "wide" syntax states.
This bug report was last modified 5 years ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.