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

From: Lennart Borgman <[email-masked]>
Date: Sun, 29 Jan 2012 02:19:50 +0100

On Sun, Jan 29, 2012 at 01:34, Juanma Barranquero <[email-masked]> wrote:
> 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 ;-)

Did I miss something? I can't see that I can directly add it to
css-mode-hook. Please tell me how to do it!