Is there a way to get a word to be rendered with a different face in text mode?
+1
A:
Yes,
What you want is font-lock-mode.
See here: http://www.gnu.org/software/emacs/manual/html%5Fnode/emacs/Font-Lock.html
Specifically you'll want to turn on font-lock-mode
and then specify a list of keywords via font-lock-add-keywords
.
chollida
2009-11-05 19:23:58
huh ? in text mode ?
Bahbar
2009-11-05 21:25:55
Sure why not, you just need to add a hook for text-mode. I've just done it on my local machine. What don't you think is possible?
chollida
2009-11-05 21:32:21
+5
A:
Check out `highlight-regexp'. Just type in the word you want to change the face for (although it can be any regular expression).
M-x highlight-regexp
highlight-regexp is an alias for `hi-lock-face-buffer' in
`hi-lock.el'.
It is bound to M-s h r.
(highlight-regexp regexp &optional face)
Set face of each match of regexp to face.
Interactively, prompt for regexp then face. Buffer-local history
list maintained for regexps, global history maintained for faces.
Use M-p to retrieve previous history items,
and M-n to retrieve default values.
justinhj
2009-11-05 19:32:11