GNU bug report logs - #16915
24.3.50; [ruby-mode] Comments in regexps using the extended syntax are not font-locked properly

Previous Next

Package: emacs;

Reported by: Bozhidar Batsov <bozhidar <at> batsov.com>

Date: Sat, 1 Mar 2014 13:32:01 UTC

Severity: minor

Found in version 24.3.50

Full log


Message #32 received at 16915 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 16915 <at> debbugs.gnu.org, Bozhidar Batsov <bozhidar <at> batsov.com>
Subject: Re: bug#16915: 24.3.50;
 [ruby-mode] Comments in regexps using the extended syntax are not
 font-locked properly
Date: Wed, 12 Mar 2014 10:25:30 -0400
> 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.