[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: change faces interactively
From: |
Michael Heerdegen |
Subject: |
Re: change faces interactively |
Date: |
Mon, 23 Jan 2012 19:05:22 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) |
Hello,
if you want a low-level solution, you can use `highlight-regexp' from
"hi-lock.el", which is part of vanilla Emacs.
If you want the highlighting to be performed automatically when you
visit the file, you can use `eval' in the file local variable
declarations. Simple example (just create a file with this content to
try):
--8<---------------cut here---------------start------------->8---
I use Emacs, because Emacs is really cool!
Local Variables:
eval: (highlight-regexp "Emacs" "bold")
End:
--8<---------------cut here---------------end--------------->8---
There are different solutions, depending on what you want to do
specifically. If you want syntactical highlighting, it's better to use
font-lock, like in the example from Andreas.
Regards,
Michael.