How to highlight all occurrences of a word in an Emacs buffer?
The hi-lock
suggestions are good. I think it's easier to use the M-x versions, though:
M-x highlight-regexp
RET <REGEXP>
M-x highlight-phrase
RET <REGEXP>
highlight-phrase
is just a bit of sugar around highlight-regexp
that ignores case and translates a space in the regex to match arbitrary whitespace. Handy.
Maybe highlight-symbol.el at http://nschum.de/src/emacs/highlight-symbol/ is what you are looking for: