[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A problem in using font-lock-add-keywords
From: |
source liu |
Subject: |
Re: A problem in using font-lock-add-keywords |
Date: |
Tue, 5 Mar 2013 15:34:49 +0800 |
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