* Re: changind the iterator environment for display.
[not found] <mailman.6526.1233589604.26697.help-gnu-emacs@gnu.org>
@ 2009-02-02 16:09 ` Pascal J. Bourguignon
0 siblings, 0 replies; 3+ messages in thread
From: Pascal J. Bourguignon @ 2009-02-02 16:09 UTC (permalink / raw)
To: help-gnu-emacs
"A. Soare" <alinsoar@voila.fr> writes:
> How can I change the color of the display iteratively?
>
> I want to display a line XXXXXXXYYYYYYYZZZZZZZUUUUUUUVVVVVVVWWWWWW
>
> The first part XXXXXXX I want to colorize using the face A
>
> The part YYYYYYYY with face B
>
> and so on.
>
> I tried so:
>
> it.base_face_id = it.face_id = FACE_A;
> display_string (Str1, Qnil, Qnil, 0, 0, &it, 10, 0, 0, -1);
>
> it.base_face_id = it.face_id = FACE_B;
> display_string (Str2, Qnil, Qnil, 0, 0, &it, 10, 0, 0, -1);
>
> it.base_face_id = it.face_id = FACE_C;
> display_string (Str3, Qnil, Qnil, 0, 0, &it, 10, 0, 0, -1);
WTF?
> and it does not changes the colors as I expect to.
>
> One method would be to reset the iterator after every display, and it would work.
>
> Could someone help me?
put:
(font-lock-add-keywords
nil '(("\\(XXXXXXX\\)\\(YYYYYYY\\)\\(ZZZZZZZ\\)\\(UUUUUUU\\)\\(VVVVVVV\\)\\(WWWWWW\\)"
(1 face-a)
(2 face-b)
(3 face-c)
(4 face-d)
(5 face-e)
(6 face-f))))
in your ~/.emacs
You may substitute XXXXXXX by a regular expression matching any XXXXXXX, etc.
(and use the name of actual faces instead of face-a, etc.
--
__Pascal Bourguignon__
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: changind the iterator environment for display.
@ 2009-02-02 16:36 A. Soare
0 siblings, 0 replies; 3+ messages in thread
From: A. Soare @ 2009-02-02 16:36 UTC (permalink / raw)
To: Emacs Help [help-gnu-emacs]
No, sorry, it is good what I did. I forgot to move BASIC_FACE_ID_SENTINEL on the last position, and that is why not all the fonts added by me were registered.
> How can I change the color of the display iteratively?
>
> I want to display a line XXXXXXXYYYYYYYZZZZZZZUUUUUUUVVVVVVVWWWWWW
>
> The first part XXXXXXX I want to colorize using the face A
>
> The part YYYYYYYY with face B
>
> and so on.
>
> I tried so:
>
> it.base_face_id = it.face_id = FACE_A;
> display_string (Str1, Qnil, Qnil, 0, 0, &it, 10, 0, 0, -1);
>
> it.base_face_id = it.face_id = FACE_B;
> display_string (Str2, Qnil, Qnil, 0, 0, &it, 10, 0, 0, -1);
>
> it.base_face_id = it.face_id = FACE_C;
> display_string (Str3, Qnil, Qnil, 0, 0, &it, 10, 0, 0, -1);
>
> and it does not changes the colors as I expect to.
>
> One method would be to reset the iterator after every display, and it would work.
>
> Could someone help me?
>
> thanks in advance.
>
>
>
> ____________________________________________________
>
> Ecoutez le dernier single de U2 "Get on your boots" sur http://musiline.voila.fr !
>
____________________________________________________
Ecoutez le dernier single de U2 "Get on your boots" sur http://musiline.voila.fr !
^ permalink raw reply [flat|nested] 3+ messages in thread
* changind the iterator environment for display.
@ 2009-02-02 15:46 A. Soare
0 siblings, 0 replies; 3+ messages in thread
From: A. Soare @ 2009-02-02 15:46 UTC (permalink / raw)
To: Emacs Help [help-gnu-emacs]
How can I change the color of the display iteratively?
I want to display a line XXXXXXXYYYYYYYZZZZZZZUUUUUUUVVVVVVVWWWWWW
The first part XXXXXXX I want to colorize using the face A
The part YYYYYYYY with face B
and so on.
I tried so:
it.base_face_id = it.face_id = FACE_A;
display_string (Str1, Qnil, Qnil, 0, 0, &it, 10, 0, 0, -1);
it.base_face_id = it.face_id = FACE_B;
display_string (Str2, Qnil, Qnil, 0, 0, &it, 10, 0, 0, -1);
it.base_face_id = it.face_id = FACE_C;
display_string (Str3, Qnil, Qnil, 0, 0, &it, 10, 0, 0, -1);
and it does not changes the colors as I expect to.
One method would be to reset the iterator after every display, and it would work.
Could someone help me?
thanks in advance.
____________________________________________________
Ecoutez le dernier single de U2 "Get on your boots" sur http://musiline.voila.fr !
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-02-02 16:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.6526.1233589604.26697.help-gnu-emacs@gnu.org>
2009-02-02 16:09 ` changind the iterator environment for display Pascal J. Bourguignon
2009-02-02 16:36 A. Soare
-- strict thread matches above, loose matches on Subject: below --
2009-02-02 15:46 A. Soare
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).