From: source liu <sourceonly@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: help-gnu-emacs@gnu.org
Subject: Re: A problem in using font-lock-add-keywords
Date: Tue, 5 Mar 2013 15:34:49 +0800 [thread overview]
Message-ID: <CAAzVxgN++ZGgOUxcbJD8strQWYPh-zvYsvkk9H7=-ejyWTNK_A@mail.gmail.com> (raw)
In-Reply-To: <87d2veigrz.fsf@yandex.ru>
done!
the quote teach me a lesson. Thank you, Dmitry
by the way, if i use this way, are there any restriction to the list,
i mean, length, or size of the 'mylist' as metioned below.
> The problem is likely with quoting. You need to expand the `regexp-opt'
> call:
>
> (font-lock-add-keywords nil
> `((,(regexp-opt mylist t) 1 font-lock-warning-face prepend)
> ("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face))
>
> By the way, as long as you want to highlight the whole match, you can
> use the group number 0 and no grouping.
--
Liu An
Institution of modern physics, Shanghai, China
next prev parent reply other threads:[~2013-03-05 7:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-05 2:54 A problem in using font-lock-add-keywords source liu
2013-03-05 4:58 ` Dmitry Gutov
2013-03-05 7:34 ` source liu [this message]
2013-03-05 8:50 ` Dmitry Gutov
[not found] ` <CAAzVxgMu3EnA1_FMG9oLshCxhPV03=qkVNoWKhygUJKa8C6DwA@mail.gmail.com>
2013-03-05 10:14 ` Dmitry Gutov
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='CAAzVxgN++ZGgOUxcbJD8strQWYPh-zvYsvkk9H7=-ejyWTNK_A@mail.gmail.com' \
--to=sourceonly@gmail.com \
--cc=dgutov@yandex.ru \
--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.
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).