emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rust-mode e2cd79b 084/486: auto merge of #14818 : tomjakub


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode e2cd79b 084/486: auto merge of #14818 : tomjakubowski/rust/emacs-attributes-key-value, r=pnkfelix
Date: Sat, 7 Aug 2021 09:24:53 -0400 (EDT)

branch: elpa/rust-mode
commit e2cd79b239299d14020394c9aac6cf82f6a3d158
Merge: f3c784f ef048b3
Author: bors <bors@rust-lang.org>
Commit: bors <bors@rust-lang.org>

    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"]`.
---
 rust-mode.el | 6 +++---
 1 file 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:][]")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]