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

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

Highlighting words in every possible buffer


From: Sébastien Vauban
Subject: Highlighting words in every possible buffer
Date: Mon, 25 Aug 2008 10:12:41 +0200
User-agent: Gnus/5.110009 (No Gnus v0.9) Emacs/23.0.60 (gnu/linux)

Hello,

I would like to have some words highlighted in every possible
buffer -- even in mail buffers, I'd like them highlighted
everywhere, always!

For example:

    o   get `error', `failed', `missing', etc. in bold red;
    o   get `warning', `insufficient', etc. in bold orange.

I tried something like:

--8<---------------cut here---------------start------------->8---
    (dolist (mode '(c-mode
                    text-mode
                    java-mode
                    cperl-mode
                    html-mode-hook
                    css-mode-hook
                    emacs-lisp-mode
                    nuweb-mode
                    latex-mode))
      (font-lock-add-keywords mode
       '(("\\<\\(XXX\\|FIXME\\|TODO\\|[eE][rR][rR][oO][rR]\\|BUG\\)"
          0 font-lock-warning-face t)
         
("\\<\\([wW][aA][rR][nN][iI][nN][gG]\\|[mM][iI][sS][sS][iI][nN][gG]\\|[iI][nN][vV][aA][lL][iI][dD]\\|[fF][aA][iI][lL][eE][dD]\\)"
          0 font-lock-warning-face t))))
--8<---------------cut here---------------end--------------->8---

But it does not work like expected...

    o   the words are not highlighted in *LaTeX* compilation
        buffer -- or, only after I manually ask for reverting
        the buffer;

    o   the words are not highlighted in shell outputs and the
        like (*grep* output, etc.).

Can you help?

Best regards,
  Seb

--
Sébastien Vauban


reply via email to

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