GNU bug report logs -
#36136
syntax-ppss fails to invalidate its cache on changes to syntax-table text properties
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Sat, 8 Jun 2019 13:18:01 UTC
Severity: normal
Tags: wontfix
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#36136: syntax-ppss fails to invalidate its cache on changes to syntax-table text properties
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 36136 <at> debbugs.gnu.org.
--
36136: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36136
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
tags 36136 + wontfix
quit
It has been decided not to fix this bug, since it doesn't affect many
packages, and easy (though ugly) workarounds are available, principally
by the affected packages calling syntax-ppss-flush-cache.
--
Alan Mackenzie (Nuremberg, Germany).
[Message part 3 (message/rfc822, inline)]
Hello, Emacs.
The syntax-ppss cache is not invalidated when syntax-table text
properties are set or cleared. This is because the invalidation
function, syntax-ppss-flush-cache is invoked only as a before-change
function, but typical (?all) syntax-table property changes happen when
before-change-functions is inactive.
This is a bug.
In my debugging of a CC Mode scenario, a buffer change causes a
syntax-table text property change at an earlier part of the buffer. This
is to do with the change making previously non-matching C++ raw string
identifiers match up. Font lock follows the syntax-ppss state, which
spuriously records that the end part of the buffer is still in a string.
Hence the non-string part of the buffer is still fontified with
font-lock-string-face.
Suggested fix: the functions set_properties, add_properties,
remove_properties in textprop.c should check for changes to,
specifically, syntax-table properties. When these changes are detected,
a hook called something like syntax-table-props-change-alert-hook should
be called (with some appropriate position parameters, tbd).
syntax-ppss-flush-cache will be added to this hook.
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 5 years and 267 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.