Subject: Re: bug#10633: Please mark invalid "; !important;" in CSS

From: Juanma Barranquero <[email-masked]>
Date: Sun, 29 Jan 2012 01:34:41 +0100

On Sun, Jan 29, 2012 at 01:10, Lennart Borgman
<[email-masked]> wrote:

> Here is a way to do it:
>
> - In isearch-forward-regexp do M-s-h-r to hilight the pattern.
> - Then use hi-lock-write-interactive-patterns to write it down in the
> buffer for the moment (so you do not have to think about it...;-)
> - Now to css-mode-hook add something like this (hi-lock-face-buffer ";
> +!important;" 'hi-my-face)
>
> In my .emacs I added:
>
> (add-hook 'css-mode-hook 'my-hilock-css-important-errors)
> (defun my-hilock-css-important-errors()
>  (hi-lock-face-buffer "; +!important;" 'hi-my-magenta))

So you're reimplementing what the file patterns of hi-lock-mode are
already designed to do. Congratulations ;-)

    Juanma