Subject: bug#21638: closed (Re: bug#21638: 25.0.50; font-lock for CSS variables)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 07 Oct 2015 17:29:02 +0000

Your bug report

#21638: 25.0.50; font-lock for CSS variables

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
21638: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21638
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#21638: 25.0.50; font-lock for CSS variables
From: Simen Heggestøyl <[email-masked]>
To: Tom Tromey <[email-masked]>
Cc: [email-masked], [email-masked]
Date: Wed, 07 Oct 2015 19:28:26 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Tom Tromey <[email-masked]> writes:
> Simen> Good idea. The patch seems to do the job, but it also has the side
> Simen> effect that '---foo', '----foo' and so on are recognized as
> Simen> properties.
>
> Yeah, sorry, I forgot that the rest had to look like an identifier.
>
> Simen> Though I'm unsure what 'css-nmstart-re' is intended to contain,
> Simen> since
> Simen> it's missing a docstring. Maybe Stefan knows?
>
> Considering that this is the only use I think you are on safe ground.
>
> Tom

Alright Tom, I've installed the fix.

Thanks for the report!

-- Simen

Subject: 25.0.50; font-lock for CSS variables
From: Tom Tromey <[email-masked]>
To: [email-masked]
Date: Tue, 06 Oct 2015 11:57:07 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

Right now CSS mode doesn't treat CSS variable definitions as
properties.  I think it should.

Here's the patch that worked for me:

diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 5f4eebd..97dd8ab 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -289,7 +289,7 @@ css--font-lock-keywords
                      nil)))
     ;; Properties.  Again, we don't limit ourselves to css-property-ids.
     (,(concat "\\(?:[{;]\\|^\\)[ \t]*\\("
-              "\\(?:\\(" css-proprietary-nmstart-re "\\)\\|"
+              "\\(?:\\(" css-proprietary-nmstart-re "\\)\\|--\\|"
               css-nmstart-re "\\)" css-nmchar-re "*"
               "\\)\\s-*:")
      (1 (if (match-end 2) 'css-proprietary-property 'css-property)))

Tom

In GNU Emacs 25.0.50.3 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6)
 of 2015-10-06
Repository revision: b8adff8426a4532a0971e9a470d3347aafd99b35
Windowing system distributor 'Fedora Project', version 11.0.11702000
Configured using:
 'configure --prefix=/home/tromey/Emacs/install/
 --with-file-notification=no'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS
LIBSELINUX GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: CSS

Minor modes in effect:
  bug-reference-prog-mode: t
  diff-auto-refine-mode: t
  erc-spelling-mode: t
  erc-truncate-mode: t
  flyspell-mode: t
  which-function-mode: t
  projectile-global-mode: t
  projectile-mode: t
  erc-notify-mode: t
  erc-notifications-mode: t
  erc-services-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-autojoin-mode: t
  erc-ring-mode: t
  erc-networks-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-netsplit-mode: t
  erc-hl-nicks-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  savehist-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  auto-fill-function: #[128 \300\301\302.#\207 [apply smie-auto-fill #[128 \301\302\300!."\207 [normal-auto-fill-function apply default-value] 4 

(fn &rest ARGS)] nil] 5 nil]
  transient-mark-mode: t

Recent messages:
	") (put-text-property (point) (match-end 0) (quote font-lock-multiline) t) nil))) ("\\(?:[{;]\\|^\\)[ 	]*\\(\\(?:\\([-_]\\(?:khtml\\|m\\(?:oz\\|s\\)\\|o\\|webkit\\)-\\)\\|--\\|\\(?:[[:alpha:]]\\|\\\\\\(?:[^.-]\\|[0-9a-fA-F]+[ 
	.]?\\)\\)\\)\\(?:[-[:alnum:]]\\|\\\\\\(?:[^.-]\\|[0-9a-fA-F]+[ 
	.]?\\)\\)*\\)\\s-*:" (1 (if (match-end 2) (quote css-proprietary-property) (quote css-property)))) ("url\\((\\)[[:space:]]*\\(?:\\\\.\\|[^()[:space:]
'\"]\\)+[[:space:]]*\\()\\)" (1 (quote default) t) (2 (quote default) t)))
Mark set
Mark saved where search started
Saving file /home/tromey/firefox-git/tree-2/devtools/client/styleinspector/test/doc_copystyles.css...
Wrote /home/tromey/firefox-git/tree-2/devtools/client/styleinspector/test/doc_copystyles.css
Finding changes in /home/tromey/Emacs/emacs/lisp/textmodes/css-mode.el...done
Quit [4 times]
funcall-interactively: No recursive edit is in progress

Load-path shadows:
/home/tromey/.emacs.d/elpa/bubbles-0.5/bubbles hides /home/tromey/Emacs/install/share/emacs/25.0.50/lisp/play/bubbles

Features:
(shadow mail-hist emacsbug whitespace css-mode texinfo git-commit-mode
log-edit pcvs-util smerge-mode gnus-fun eieio-opt speedbar sb-image
ezimage dframe dabbrev git-rebase-mode flow-fill misearch multi-isearch
add-log bug-reference js json cc-mode cc-fonts cc-guess cc-menus cc-cmds
gnus-html url-cache mm-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util url-parse
url-vars shr-color shr dom browse-url mm-archive bbdb-gui bbdb-hooks
bbdb-rmail rmailsum rmail sort smiley gnus-cite gnus-bcklg gnus-async qp
gnus-ml disp-table copyright vc-mtn vc-hg vc-git diff-mode vc-bzr vc-src
vc-sccs vc-svn vc-cvs vc-rcs term/xterm xterm gnus-topic nndraft nnmh
nnfolder utf-7 bbdb-gnus bbdb-snarf mail-extr bbdb-com warnings
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp
gnus-cache gnus-registry registry eieio-compat eieio-base gnus-art mm-uu
mml2015 mm-view mml-smime smime dig mailcap gnus-sum gnus-group
gnus-undo smtpmail sendmail gnus-start gnus-cloud nnimap nnmail
mail-source utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range
message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader
gnus-win gnus gnus-ems nnheader mail-utils gnutls network-stream nsm
starttls tls erc-spelling erc-truncate flyspell ispell diminish appt
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs which-func imenu
projectile ibuf-macs ibuf-ext ibuffer minimap autorevert filenotify
desktop frameset cus-start cus-load erc-notify erc-desktop-notifications
notifications dbus xml erc-services erc-list erc-menu erc-join erc-ring
erc-networks erc-pcomplete pcomplete erc-track erc-match erc-netsplit
erc-hl-nicks color erc-button erc-fill erc-stamp wid-edit erc-goodies
erc erc-backend erc-compat format-spec auth-source eieio byte-opt
bytecomp byte-compile cl-extra cconv gnus-util mm-util help-fns
mail-prsvr password-cache thingatpt pp status dired-aux dired-x dired
advice vc-dir ewoc vc vc-dispatcher flycheck derived easy-mmode cl-seq
edmacro kmacro find-func help-mode rx subr-x dash jka-compr sh-script
smie executable compile let-alist cc-styles cc-align cc-engine cc-vars
cc-defs bbdb cl timezone ange-ftp comint ansi-color ring server savehist
finder-inf bbdb-autoloads dwarf-mode-autoloads eieio-core cl-macs gv
cl-loaddefs pcase cl-lib lisppaste-autoloads pydoc-info-autoloads
info-look weblogger-autoloads info package easymenu epg-config time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset
image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham
georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote dbusbind dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 1584563 702016)
 (symbols 48 102069 0)
 (miscs 40 23022 3346)
 (strings 32 661191 206096)
 (string-bytes 1 24535493)
 (vectors 16 104304)
 (vector-slots 8 2294514 218530)
 (floats 8 874 1102)
 (intervals 56 38889 1534)
 (buffers 976 98)
 (heap 1024 301266 64795))