aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorSimen Heggestøyl2017-06-11 17:41:09 +0200
committerSimen Heggestøyl2017-06-11 19:32:17 +0200
commitee051688c18b3bd7bb7c7a01100f09f7dd402ba6 (patch)
tree57811395709db4c3951a5c59bfbc1cf23c929a30 /lisp
parent8160c7d914882b40badf9eb8e4792da1b313745e (diff)
downloademacs-ee051688c18b3bd7bb7c7a01100f09f7dd402ba6.tar.gz
emacs-ee051688c18b3bd7bb7c7a01100f09f7dd402ba6.zip
Fix highlighting of CSS selectors with double hyphens
* lisp/textmodes/css-mode.el (css--font-lock-keywords): Fix highlighting of selectors that contain double hyphens. They would be mistaken for a variable.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/textmodes/css-mode.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 45d750af755..0beaaaa32f1 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -852,8 +852,6 @@ cannot be completed sensibly: `custom-ident',
852 ;; Since "An at-rule consists of everything up to and including the next 852 ;; Since "An at-rule consists of everything up to and including the next
853 ;; semicolon (;) or the next block, whichever comes first." 853 ;; semicolon (;) or the next block, whichever comes first."
854 (,(concat "@" css-ident-re) (0 font-lock-builtin-face)) 854 (,(concat "@" css-ident-re) (0 font-lock-builtin-face))
855 ;; Variables.
856 (,(concat "--" css-ident-re) (0 font-lock-variable-name-face))
857 ;; Selectors. 855 ;; Selectors.
858 ;; Allow plain ":root" as a selector. 856 ;; Allow plain ":root" as a selector.
859 ("^[ \t]*\\(:root\\)\\(?:[\n \t]*\\)*{" (1 'css-selector keep)) 857 ("^[ \t]*\\(:root\\)\\(?:[\n \t]*\\)*{" (1 'css-selector keep))
@@ -898,6 +896,8 @@ cannot be completed sensibly: `custom-ident',
898 'font-lock-multiline t) 896 'font-lock-multiline t)
899 ;; No face. 897 ;; No face.
900 nil))) 898 nil)))
899 ;; Variables.
900 (,(concat "--" css-ident-re) (0 font-lock-variable-name-face))
901 ;; Properties. Again, we don't limit ourselves to css-property-ids. 901 ;; Properties. Again, we don't limit ourselves to css-property-ids.
902 (,(concat "\\(?:[{;]\\|^\\)[ \t]*\\(" 902 (,(concat "\\(?:[{;]\\|^\\)[ \t]*\\("
903 "\\(?:\\(" css-proprietary-nmstart-re "\\)\\|" 903 "\\(?:\\(" css-proprietary-nmstart-re "\\)\\|"