GNU bug report logs - #10633
Please mark invalid "; !important;" in CSS

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Sat, 28 Jan 2012 22:03:02 UTC

Severity: wishlist

Tags: wontfix

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 10633 <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 10633 <at> debbugs.gnu.org
Subject: Re: 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
<lennart.borgman <at> gmail.com> 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




This bug report was last modified 12 years and 224 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.