help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Different fonts per region


From: Emanuel Berg
Subject: Re: Different fonts per region
Date: Thu, 03 Mar 2016 01:37:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

henry atting <atting@posteo.de> writes:

> Okay, I can change the font per buffer, frame, mode
> or set another default font. Is it also possible to
> set the font per region, say have three different
> regions in a buffer with three different fonts?
> Just to know if it's possible; outside emacs it
> would be of little avail anyway.

It is possible:

Just look! (It is red.)

And this is yellow: I'm rubber, you're glue.

Have a look:

    http://user.it.uu.se/~embe8573/pics/region-colors.png

Note tho I had to do `text-mode' first as the
colorizing stuff isn't supported for `message-mode'
just yet. Something you could add, perhaps?

Anyway what you look for is the `facemenu-' stuff,
e.g., `facemenu-set-foreground' which I used for the
examples above.

By the way, anyone who is interested in colorizing the
message buffer, check out this little pearl from the
bottomless pit of the technicolor ocean:

(font-lock-add-keywords 'message-mode
 '(
   ("`\\(.*?\\)'" (1 font-lock-reference-face))
   )
 t)

And the next step is a function that colorizes it red
if there isn't such a function or variable defined!

Dig (dive) deep :)

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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