* bug#5732: css-mode doesn't correctly highlight "grouped" selectors
@ 2010-03-17 11:25 Deniz Dogan
2010-04-10 17:16 ` Chong Yidong
2010-06-24 22:56 ` bug#5732: Deniz Dogan
0 siblings, 2 replies; 4+ messages in thread
From: Deniz Dogan @ 2010-03-17 11:25 UTC (permalink / raw)
To: 5732
css-mode doesn't seem to correctly highlight anything but the last
selector if grouping them as such:
#topic span,
#topic b,
#topic i {
...
}
In the above example only the selector "#topic i" is highlighted
correctly, the preceding ones get the `default' face. When putting the
selectors on one line, all works well.
In GNU Emacs 23.1.91.1 (i386-mingw-nt6.0.6002)
of 2010-01-03 on PRETEST
Windowing system distributor `Microsoft Corp.', version 6.0.6002
configured using `configure --with-gcc (3.4)'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en
value of $XMODIFIERS: nil
locale-coding-system: cp1252
default enable-multibyte-characters: t
Major mode: Emacs-Lisp
Minor modes in effect:
rcirc-track-minor-mode: t
diff-auto-refine-mode: t
global-auto-complete-mode: t
auto-complete-mode: t
tooltip-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
Recent input:
Irrelevant.
Recent messages:
Nothing relevant here.
Load-path shadows:
~/.emacs.d/js hides c:/Program Files/emacs/lisp/progmodes/js
c:/Program Files/emacs/lisp/progmodes/sym-comp hides c:/Program
Files/emacs/lisp/obsolete/sym-comp
c:/Program Files/emacs/lisp/emacs-lisp/lucid hides c:/Program
Files/emacs/lisp/obsolete/lucid
c:/Program Files/emacs/lisp/emacs-lisp/levents hides c:/Program
Files/emacs/lisp/obsolete/levents
Features:
(shadow sort mail-extr message smtpmail sendmail ecomplete rfc822 mml
mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse
rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util
netrc mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1
hex-util hashcash mail-utils emacsbug crm find-func help-mode help-fns
css-mode multi-isearch vc-hg nxml-uchnm rng-xsd xsd-regexp rng-cmpct
rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt
rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util
nxml-glyph nxml-enc xmltok rcirc time-date cus-start cus-load
html-helper-skorpan edmacro kmacro ido js byte-opt bytecomp byte-compile
json thingatpt etags ring imenu newcomment cc-mode cc-fonts cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt
mercurial view vc vc-dispatcher executable diff-mode easymenu
dropdown-list auto-complete-css auto-complete easy-mmode cl cl-19
tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 disp-table
ls-lisp w32-win w32-vars tool-bar dnd fontset image fringe lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
loaddefs button minibuffer faces cus-face files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process multi-tty emacs)
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#5732: css-mode doesn't correctly highlight "grouped" selectors
2010-03-17 11:25 bug#5732: css-mode doesn't correctly highlight "grouped" selectors Deniz Dogan
@ 2010-04-10 17:16 ` Chong Yidong
2010-06-24 22:56 ` bug#5732: Deniz Dogan
1 sibling, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2010-04-10 17:16 UTC (permalink / raw)
To: Deniz Dogan; +Cc: 5732
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#5732:
2010-03-17 11:25 bug#5732: css-mode doesn't correctly highlight "grouped" selectors Deniz Dogan
2010-04-10 17:16 ` Chong Yidong
@ 2010-06-24 22:56 ` Deniz Dogan
2011-09-18 19:24 ` bug#5732: css-mode doesn't correctly highlight "grouped" selectors Lars Magne Ingebrigtsen
1 sibling, 1 reply; 4+ messages in thread
From: Deniz Dogan @ 2010-06-24 22:56 UTC (permalink / raw)
To: 5732
Works for me, but I haven't really tested it thoroughly.
--
Deniz Dogan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-18 19:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-17 11:25 bug#5732: css-mode doesn't correctly highlight "grouped" selectors Deniz Dogan
2010-04-10 17:16 ` Chong Yidong
2010-06-24 22:56 ` bug#5732: Deniz Dogan
2011-09-18 19:24 ` bug#5732: css-mode doesn't correctly highlight "grouped" selectors Lars Magne Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).