emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] Re: muse colors (and documentation)


From: Oursoye
Subject: [emacs-wiki-discuss] Re: muse colors (and documentation)
Date: Sat, 18 Mar 2006 17:24:18 +0000 (UTC)
User-agent: slrn/0.9.8.1 (Debian)

Le 16-03-2006, Oursoye <address@hidden> a écrit :
>
> I tried to highlight the word "groupe" in a
> planner-appt-forthcoming-display buffer. This buffer
> uses the planner mode, so I changed the
> muse-colors-markup variable. 

I realised that it is a very bad idea to change
'muse-colors-markup, since the structure of the code
clearly shows that it is not intended to be changed by
the end-user. 

The good procedure to modify the colors
is easily derived from the example below which changes
the colors in the
planner-appt-forthcoming-display-buffer. 

(add-hook 'planner-mode-hook
            (lambda () "" (when (equal (buffer-name)
            planner-appt-forthcoming-display-buffer)
                  (add-to-list 'muse-colors-buffer-hook
                  'colorier-buffer-appointments))))
where 
'colorier-buffer-appointments is a function which
changes the colors in the buffer. This function must
depend on three parameters: beg end &optional verbose.
You can use the parameters to change the colors 
between BEG and END, but the hooks run the
function always with BEG=(point-min) and END=(point-max).

Maybe there could be some words in the documentation
about this since it takes a long time to understand 
the code producing the colors (in particular to understand how and
when 'muse-colors-vector is constructed and used). 

O





reply via email to

[Prev in Thread] Current Thread [Next in Thread]