From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Some parts of font locking in my new major mode works only after modifying the buffer
Date: Sun, 25 Aug 2013 09:46:25 -0400 [thread overview]
Message-ID: <jwvfvtx99a1.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 2f4135d5-2203-4d5f-9c78-9a550c224b55@googlegroups.com
> 1 <editword> <n> Words = {Esc} $2 $1;
> 2
> 3 ### Lines
> 4
> 5 New Line = {Enter};
> 6 Newline Indent = {Ctrl+j};
[...]
> '(("^\\([^=]+\\)=" 1 font-lock-variable-name-face)
This regexp will match (on the first call) "<editword> <n> Words =" on
the first call. And on the second it will match:
" {Esc} $2 $1;
### Lines
New Line ="
This text includes parts that are already highlighted (the "### Lines"
comment), so font-lock doesn't apply the text-property. You can force
it to apply the text property (using the OVERRIDE part of the rule, see
C-h v font-lock-keywords), but I doubt that's what you want anyway,
Stefan
prev parent reply other threads:[~2013-08-25 13:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-18 21:04 Some parts of font locking in my new major mode works only after modifying the buffer mathias.dahl
2013-08-25 13:46 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvfvtx99a1.fsf-monnier+gnu.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=help-gnu-emacs@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.