diff options
| author | Paul Eggert | 2019-03-26 19:06:36 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-03-26 19:07:21 -0700 |
| commit | 5d6a314475704f3fbdb29f68c6929516230e8a98 (patch) | |
| tree | ad00278e70192b7bfb072b436a0aa607ed20a9a9 /lisp/textmodes/css-mode.el | |
| parent | c8ec3108a3d0bd1955d21f40b3c0c3b36d55b20d (diff) | |
| download | emacs-5d6a314475704f3fbdb29f68c6929516230e8a98.tar.gz emacs-5d6a314475704f3fbdb29f68c6929516230e8a98.zip | |
2019-03-26 regex cleanup
Problems reported by Mattias Engdegård in:
https://lists.gnu.org/r/emacs-devel/2019-03/msg01028.html
* lisp/align.el (align-rules-list):
* lisp/speedbar.el (speedbar-check-read-only, speedbar-check-vc):
* lisp/vc/diff-mode.el (diff-add-change-log-entries-other-window):
* lisp/woman.el (woman-parse-numeric-arg):
Put "-" at end of character alternatives, since a range was not intended.
* lisp/erc/erc.el (font-lock):
* lisp/mail/footnote.el (cl-seq):
Avoid duplicate character alternatives by using cl-seq API.
* lisp/mail/footnote.el (footnote--current-regexp):
* lisp/textmodes/css-mode.el (css--font-lock-keywords):
Avoid repetition of repetition.
* lisp/net/webjump.el (webjump-url-encode):
Add ~ to character alternatives, and rewrite confusing range.
* lisp/progmodes/verilog-mode.el (verilog-compiler-directives)
(verilog-assignment-operator-re):
Remove duplicate.
* lisp/progmodes/verilog-mode.el (verilog-preprocessor-re):
* lisp/textmodes/css-mode.el (css--font-lock-keywords):
Don’t escape a char that doesn’t need it.
* lisp/textmodes/picture.el (picture-tab-chars): In docstring,
do not say regexp characters will be quoted; merely say in
another way that the syntax is that of character alternatives.
(picture-set-tab-stops, picture-tab-search): Don’t attempt
to regexp-quote picture-tab-chars.
(picture-tab-search): Quote \ in picture-tab-chars for
skip-chars-backwards, which treats \ differently than
regexp character alternatives do.
Diffstat (limited to 'lisp/textmodes/css-mode.el')
| -rw-r--r-- | lisp/textmodes/css-mode.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index cddcdc0947b..57ecc9788eb 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el | |||
| @@ -892,7 +892,7 @@ cannot be completed sensibly: `custom-ident', | |||
| 892 | (,(concat "@" css-ident-re) (0 font-lock-builtin-face)) | 892 | (,(concat "@" css-ident-re) (0 font-lock-builtin-face)) |
| 893 | ;; Selectors. | 893 | ;; Selectors. |
| 894 | ;; Allow plain ":root" as a selector. | 894 | ;; Allow plain ":root" as a selector. |
| 895 | ("^[ \t]*\\(:root\\)\\(?:[\n \t]*\\)*{" (1 'css-selector keep)) | 895 | ("^[ \t]*\\(:root\\)\\(?:[\n \t]*\\){" (1 'css-selector keep)) |
| 896 | ;; FIXME: attribute selectors don't work well because they may contain | 896 | ;; FIXME: attribute selectors don't work well because they may contain |
| 897 | ;; strings which have already been highlighted as f-l-string-face and | 897 | ;; strings which have already been highlighted as f-l-string-face and |
| 898 | ;; thus prevent this highlighting from being applied (actually now that | 898 | ;; thus prevent this highlighting from being applied (actually now that |
| @@ -915,7 +915,7 @@ cannot be completed sensibly: `custom-ident', | |||
| 915 | "\\(?:\\(:" (regexp-opt (append css-pseudo-class-ids | 915 | "\\(?:\\(:" (regexp-opt (append css-pseudo-class-ids |
| 916 | css-pseudo-element-ids) | 916 | css-pseudo-element-ids) |
| 917 | t) | 917 | t) |
| 918 | "\\|\\::" (regexp-opt css-pseudo-element-ids t) "\\)" | 918 | "\\|::" (regexp-opt css-pseudo-element-ids t) "\\)" |
| 919 | "\\(?:([^)]+)\\)?" | 919 | "\\(?:([^)]+)\\)?" |
| 920 | (if (not sassy) | 920 | (if (not sassy) |
| 921 | "[^:{}()\n]*" | 921 | "[^:{}()\n]*" |