diff options
| author | bors <bors@rust-lang.org> | 2014-06-17 08:16:27 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-06-17 08:16:27 +0000 |
| commit | e2cd79b239299d14020394c9aac6cf82f6a3d158 (patch) | |
| tree | cb529c05e7449258035727b1ab9a695395733b38 | |
| parent | f3c784f62e1108e75c42fef4391d6b6c5fab8d6d (diff) | |
| parent | ef048b3786e9efc3ea5d0ff731faea26ad817b4e (diff) | |
| download | rust-mode-e2cd79b239299d14020394c9aac6cf82f6a3d158.tar.gz | |
auto merge of #14818 : tomjakubowski/rust/emacs-attributes-key-value, r=pnkfelix
This addresses two problems noted in #14347: the highlight of `#foo]` as an attribute, and the non-highlight of `#[foo = "bar"]`.
| -rw-r--r-- | rust-mode.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rust-mode.el b/rust-mode.el index 818595b..67f4951 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)]` - (,(rust-re-grab (concat "#\\!?[" rust-re-ident "[^]]*\\]")) - 1 font-lock-preprocessor-face) + ;; Attributes like `#[bar(baz)]` or `#![bar(baz)]` or `#[bar = "baz"]` + (,(rust-re-grab (concat "#\\!?\\[" rust-re-ident "[^]]*\\]")) + 1 font-lock-preprocessor-face t) ;; Syntax extension invocations like `foo!`, highlight including the ! (,(concat (rust-re-grab (concat rust-re-ident "!")) "[({[:space:][]") |
