From 1a1c47b91824bae040ddc2d799e14365b5415762 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Wed, 2 Apr 2014 23:50:20 +0200 Subject: [PATCH] Update emacs mode to support new `#![inner(attribute)]` syntax. --- src/etc/emacs/rust-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/etc/emacs/rust-mode.el b/src/etc/emacs/rust-mode.el index 3a99af3446c..5cee600c2c0 100644 --- a/src/etc/emacs/rust-mode.el +++ b/src/etc/emacs/rust-mode.el @@ -196,8 +196,8 @@ ;; Special types (,(regexp-opt rust-special-types 'words) . font-lock-type-face) - ;; Attributes like `#[bar(baz)]` - (,(rust-re-grab (concat "#\\[" rust-re-ident "[^]]*\\]")) + ;; Attributes like `#[bar(baz)]` or `#![bar(baz)]` + (,(rust-re-grab (concat "#\\!?[" rust-re-ident "[^]]*\\]")) 1 font-lock-preprocessor-face) ;; Syntax extension invocations like `foo!`, highlight including the !