GNU bug report logs - #5732
css-mode doesn't correctly highlight "grouped" selectors

Previous Next

Package: emacs;

Reported by: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>

Date: Wed, 17 Mar 2010 11:26:01 UTC

Severity: normal

Tags: fixed

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5732 in the body.
You can then email your comments to 5732 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5732; Package emacs. (Wed, 17 Mar 2010 11:26:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Deniz Dogan <deniz.a.m.dogan <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 17 Mar 2010 11:26:01 GMT) Full text and rfc822 format available.

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

From: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: css-mode doesn't correctly highlight "grouped" selectors
Date: Wed, 17 Mar 2010 12:25:14 +0100
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)




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5732; Package emacs. (Sat, 10 Apr 2010 17:17:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>
Cc: 5732 <at> debbugs.gnu.org
Subject: Re: 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




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5732; Package emacs. (Thu, 24 Jun 2010 22:58:01 GMT) Full text and rfc822 format available.

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

From: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>
To: 5732 <at> debbugs.gnu.org
Date: Fri, 25 Jun 2010 00:56:35 +0200
Works for me, but I haven't really tested it thoroughly.

-- 
Deniz Dogan




Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 18 Sep 2011 19:33:01 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.1, send any further explanations to 5732 <at> debbugs.gnu.org and Deniz Dogan <deniz.a.m.dogan <at> gmail.com> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 18 Sep 2011 19:33:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5732; Package emacs. (Sun, 18 Sep 2011 19:40:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Deniz Dogan <deniz.a.m.dogan <at> gmail.com>
Cc: 5732 <at> debbugs.gnu.org
Subject: Re: css-mode doesn't correctly highlight "grouped" selectors
Date: Sun, 18 Sep 2011 21:24:03 +0200
Deniz Dogan <deniz.a.m.dogan <at> gmail.com> writes:

> Works for me, but I haven't really tested it thoroughly.

Works for me, too, so I'm closing this report.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Oct 2011 11:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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