[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] Re: How to add user defined highlight to muse-mode
From: |
Michael Olson |
Subject: |
[emacs-wiki-discuss] Re: How to add user defined highlight to muse-mode |
Date: |
Sun, 02 Apr 2006 10:57:58 -0400 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
highfly22 <address@hidden> writes:
> All I want are like this:
>
> (defvar gtd-font-lock-keywords
> '(("^\\.\\[N\\]" . howm-reminder-done-face)
> ("^\\[N\\]" . gtd-next-action-face)
> ("^\\[P\\]" . gtd-project-face)
> ("^\\[S\\]" . gtd-someday-face) )
> "highlight for next action list, project list and someday list"
> )
>
> (font-lock-add-keywords nil gtd-font-lock-keywords)
>
> It is to add some completely new highlighting rules using
> font-lock-mode. It works at the text mode, but no uses in
> muse-mode.
The following should work, instead of using `font-lock-add-keywords'.
(dolist (rule gtd-font-lock-keywords)
(add-to-list 'muse-colors-markup
(list (car rule) t (cdr rule))
t))
--
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Interests: Emacs Lisp, text markup, protocols -- Muse, Planner, ERC, EMMS
/` |\ | | | IRC: mwolson on freenode.net: #hcoop, #muse, #PurdueLUG
|_] | \| |_| Jabber: mwolson_at_hcoop.net
pgpkTkn9WVUlv.pgp
Description: PGP signature