summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
authorTom Jakubowski <tom@crystae.net>2014-06-11 05:06:51 -0700
committerTom Jakubowski <tom@crystae.net>2014-06-11 05:06:51 -0700
commitef048b3786e9efc3ea5d0ff731faea26ad817b4e (patch)
treea132ff494f6b4c9c2e9416f6002475bdbf584b12 /rust-mode.el
parent4e0a3340e13fa4cab8b4c51b2afb4fe103902e46 (diff)
downloadrust-mode-ef048b3786e9efc3ea5d0ff731faea26ad817b4e.tar.gz
emacs: highlight `#[foo = "bar"]` attributes
Setting `OVERRIDE` to `t` overrides the conflicting highlight Emacs places on string literals. Fix #14347
Diffstat (limited to 'rust-mode.el')
-rw-r--r--rust-mode.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust-mode.el b/rust-mode.el
index f5a3fb9..bec7830 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -212,9 +212,9 @@
;; Special types
(,(regexp-opt rust-special-types 'words) . font-lock-type-face)
- ;; Attributes like `#[bar(baz)]` or `#![bar(baz)]`
+ ;; Attributes like `#[bar(baz)]` or `#![bar(baz)]` or `#[bar = "baz"]`
(,(rust-re-grab (concat "#\\!?\\[" rust-re-ident "[^]]*\\]"))
- 1 font-lock-preprocessor-face)
+ 1 font-lock-preprocessor-face t)
;; Syntax extension invocations like `foo!`, highlight including the !
(,(concat (rust-re-grab (concat rust-re-ident "!")) "[({[:space:][]")