diff options
author | Simen Heggestøyl <simenheg@gmail.com> | 2020-05-10 14:44:26 +0200 |
---|---|---|
committer | Simen Heggestøyl <simenheg@gmail.com> | 2020-05-10 14:57:22 +0200 |
commit | 1efaa1d66b9bc51284c7cac4477f45c9bde4fcfb (patch) | |
tree | ba11ecbc24d94c76f0bd5171ef87237dc880352b /lisp/textmodes/css-mode.el | |
parent | 2df2f787116a9b0f3907ffbf1027c2eab0804e7d (diff) | |
download | emacs-1efaa1d66b9bc51284c7cac4477f45c9bde4fcfb.tar.gz |
Allow underscores in CSS variable names
* lisp/textmodes/css-mode.el (css-nmchar-re): Allow underscores in
variable names (and in identifiers in general).
* test/manual/indent/css-mode.css: Add some examples of variable names
with underscores in them.
* test/manual/indent/less-css-mode.less: Add some examples of variable
names with underscores in them.
* test/manual/indent/scss-mode.scss: Add some examples of variable
names with underscores in them.
Diffstat (limited to 'lisp/textmodes/css-mode.el')
-rw-r--r-- | lisp/textmodes/css-mode.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index ab9e2dc35ec..0035c5e7b05 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -886,7 +886,7 @@ cannot be completed sensibly: `custom-ident', (defconst css-escapes-re "\\\\\\(?:[^\000-\037\177]\\|[[:xdigit:]]+[ \n\t\r\f]?\\)") -(defconst css-nmchar-re (concat "\\(?:[-[:alnum:]]\\|" css-escapes-re "\\)")) +(defconst css-nmchar-re (concat "\\(?:[-_[:alnum:]]\\|" css-escapes-re "\\)")) (defconst css-nmstart-re (concat "\\(?:[[:alpha:]]\\|" css-escapes-re "\\)")) (defconst css-ident-re ;; (concat css-nmstart-re css-nmchar-re "*") ;; Apparently, "at rules" names can start with a dash, e.g. @-moz-keyframes. |