From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 16915@debbugs.gnu.org, Bozhidar Batsov <bozhidar@batsov.com>
Subject: 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 [thread overview]
Message-ID: <jwvk3bz4hy2.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <53201131.3080400@yandex.ru> (Dmitry Gutov's message of "Wed, 12 Mar 2014 09:48:01 +0200")
> 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
prev parent reply other threads:[~2014-03-12 14:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-01 13:31 bug#16915: 24.3.50; [ruby-mode] Comments in regexps using the extended syntax are not font-locked properly Bozhidar Batsov
2014-03-01 22:19 ` Dmitry Gutov
2014-03-02 11:03 ` Bozhidar Batsov
2014-03-02 15:03 ` Dmitry Gutov
2014-03-04 10:02 ` Bozhidar Batsov
2014-03-07 21:04 ` Stefan Monnier
2014-03-10 7:21 ` Dmitry Gutov
2014-03-10 14:40 ` Stefan Monnier
2014-03-12 7:48 ` Dmitry Gutov
2014-03-12 14:25 ` Stefan Monnier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvk3bz4hy2.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=16915@debbugs.gnu.org \
--cc=bozhidar@batsov.com \
--cc=dgutov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).