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 | feb294ca1125bda576552a71c11c44a820ef8b99 (patch) | |
| tree | ef21d16eb0028e59e4c43eaaa11aa1f1694df764 | |
| parent | 9f8d2205f0518389993a9b5de6646ba8b14e5a12 (diff) | |
| parent | e5baf1d94a6c2c41fa4307c4dd3105afe5924a71 (diff) | |
| download | rust-feb294ca1125bda576552a71c11c44a820ef8b99.tar.gz rust-feb294ca1125bda576552a71c11c44a820ef8b99.zip | |
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-- | src/etc/emacs/rust-mode.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/etc/emacs/rust-mode.el b/src/etc/emacs/rust-mode.el index 818595b9dc1..67f4951193f 100644 --- a/src/etc/emacs/rust-mode.el +++ b/src/etc/emacs/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:][]") |
