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

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

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


From: Juanma Barranquero
Subject: bug#10633: Please mark invalid "; !important;" in CSS
Date: Sun, 29 Jan 2012 02:37:52 +0100

On Sun, Jan 29, 2012 at 02:19, Lennart Borgman
<address@hidden> wrote:

> 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!

Add what? The regexp? No, it's not supported (other than how you're
doing it) but it is not required either. The file patterns method is
more flexible (you can have multiple regexps, and they don't have to
be the same for every file), and easy to set up

C-x C-f yourfile.css <RET>
M-s h r ; +!important <RET> <RET>
C-x w b
C-x C-s <RET>

which you have to repeat in each .css file, but you can copy&paste, or
use a template for new .css, and you can set up other regexps to warn
you of other common pitfalls, etc.

And in your .emacs:

(add-hook 'css-mode-hook 'hi-lock-mode)
(setq hi-lock-file-patterns-policy t)
;; or the function I described before, or the default `ask'... Your choice.

But hey, whatever works for you.

    Juanma





reply via email to

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