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

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

bug#5732: css-mode doesn't correctly highlight "grouped" selectors


From: Chong Yidong
Subject: bug#5732: css-mode doesn't correctly highlight "grouped" selectors
Date: Sat, 10 Apr 2010 13:16:30 -0400

> css-mode doesn't seem to correctly highlight anything but the last
> selector if grouping them as such:
>
> #topic span,
> #topic b,
> #topic i {
>     ...
> }

How bout something like this?

*** lisp/textmodes/css-mode.el  2010-01-13 08:35:10 +0000
--- lisp/textmodes/css-mode.el  2010-04-10 17:13:44 +0000
***************
*** 236,242 ****
      ;; thus prevent this highlighting from being applied (actually now that
      ;; I use `append' this should work better).  But really the part of hte
      ;; selector between [...] should simply not be highlighted.
!     (,(concat "^\\([ \t]*[^@:{\n][^:{\n]+\\(?::" (regexp-opt css-pseudo-ids t)
                "\\(?:([^)]+)\\)?[^:{\n]*\\)*\\)\\(?:\n[ \t]*\\)*{")
       (1 'css-selector append))
      ;; In the above rule, we allow the open-brace to be on some subsequent
--- 236,242 ----
      ;; thus prevent this highlighting from being applied (actually now that
      ;; I use `append' this should work better).  But really the part of hte
      ;; selector between [...] should simply not be highlighted.
!     (,(concat "^\\([ \t]*[^@:{}\n][^:{}]+\\(?::" (regexp-opt css-pseudo-ids t)
                "\\(?:([^)]+)\\)?[^:{\n]*\\)*\\)\\(?:\n[ \t]*\\)*{")
       (1 'css-selector append))
      ;; In the above rule, we allow the open-brace to be on some subsequent






reply via email to

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