From: Tom Tromey <tom@tromey.com>
To: 21638@debbugs.gnu.org
Subject: bug#21638: 25.0.50; font-lock for CSS variables
Date: Tue, 06 Oct 2015 11:57:07 -0600 [thread overview]
Message-ID: <87twq3ev7w.fsf@tromey.com> (raw)
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:]]\\|\\\\\\(?:[^.-\x1f\x7f]\\|[0-9a-fA-F]+[
.\f]?\\)\\)\\)\\(?:[-[:alnum:]]\\|\\\\\\(?:[^.-\x1f\x7f]\\|[0-9a-fA-F]+[
.\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))
next reply other threads:[~2015-10-06 17:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-06 17:57 Tom Tromey [this message]
2015-10-06 19:24 ` bug#21638: 25.0.50; font-lock for CSS variables Simen Heggestøyl
2015-10-06 21:10 ` Tom Tromey
2015-10-07 17:28 ` Simen Heggestøyl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87twq3ev7w.fsf@tromey.com \
--to=tom@tromey.com \
--cc=21638@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.