GNU bug report logs -
#16915
24.3.50; [ruby-mode] Comments in regexps using the extended syntax are not font-locked properly
Previous Next
Full log
Message #32 received at 16915 <at> debbugs.gnu.org (full text, mbox):
> If we're speaking of multiple modes in general, syntax-ppss might not be
> enough to determine which keywords to highlight. Even if it includes
> information about new syntax classes.
It wouldn't really include info *about* new syntax classes, but the new
syntax class I suggest (which specifies a syntax-table to use) would
require changing the "parse-partial-sexp state" by keeping track of the
"current syntax-table".
"Syntax classes" are "events" which cause changes in the
parse-partial-sexp state machine, and syntax-ppss is a way to get the
state of that machine at a given position.
> Suppose we have an HTML file with <script> and <style> tags inside. Would
> points inside of these tags have different states?
Yes. E.g. (nth 10 (syntax-ppss)) would return a new "context" info
(which could just be "the syntax table to use in that area").
> Would some font-lock code compare syntax table reference attached
> to a syntax class, with a syntax table it wants?
Yes, quite possibly.
Stefan
This bug report was last modified 11 years and 95 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.