Skip to content

Commit e5baf1d

Browse files
committed
emacs: highlight #[foo = "bar"] attributes
Setting `OVERRIDE` to `t` overrides the conflicting highlight Emacs places on string literals. Fix #14347
1 parent fca57b3 commit e5baf1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/etc/emacs/rust-mode.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@
212212
;; Special types
213213
(,(regexp-opt rust-special-types 'words) . font-lock-type-face)
214214

215-
;; Attributes like `#[bar(baz)]` or `#![bar(baz)]`
215+
;; Attributes like `#[bar(baz)]` or `#![bar(baz)]` or `#[bar = "baz"]`
216216
(,(rust-re-grab (concat "#\\!?\\[" rust-re-ident "[^]]*\\]"))
217-
1 font-lock-preprocessor-face)
217+
1 font-lock-preprocessor-face t)
218218

219219
;; Syntax extension invocations like `foo!`, highlight including the !
220220
(,(concat (rust-re-grab (concat rust-re-ident "!")) "[({[:space:][]")

0 commit comments

Comments
 (0)