[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode e201404 367/486: Fix font-locking of "let ref"
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode e201404 367/486: Fix font-locking of "let ref" |
Date: |
Sat, 7 Aug 2021 09:25:54 -0400 (EDT) |
branch: elpa/rust-mode
commit e20140426e4a7331ef4055d26744b4c27848a361
Author: Tom Tromey <tom@tromey.com>
Commit: Tom Tromey <tom@tromey.com>
Fix font-locking of "let ref"
Fixes #271
---
rust-mode-tests.el | 5 +++++
rust-mode.el | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/rust-mode-tests.el b/rust-mode-tests.el
index 3e6c67a..64d65c4 100644
--- a/rust-mode-tests.el
+++ b/rust-mode-tests.el
@@ -1297,6 +1297,11 @@ list of substrings of `STR' each followed by its face."
'("let" font-lock-keyword-face
"foo" font-lock-variable-name-face))
(rust-test-font-lock
+ "let ref foo;"
+ '("let" font-lock-keyword-face
+ "ref" font-lock-keyword-face
+ "foo" font-lock-variable-name-face))
+ (rust-test-font-lock
"let mut foo;"
'("let" font-lock-keyword-face
"mut" font-lock-keyword-face
diff --git a/rust-mode.el b/rust-mode.el
index 011f615..51b92d7 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -687,7 +687,7 @@ match data if found. Returns nil if not within a Rust
string."
(,rust-re-type-or-constructor 1 font-lock-type-face)
;; Type-inferred binding
- (,(concat "\\_<\\(?:let\\|ref\\)\\s-+\\(?:mut\\s-+\\)?" (rust-re-grab
rust-re-ident) "\\_>") 1 font-lock-variable-name-face)
+ (,(concat "\\_<\\(?:let\\s-+ref\\|let\\|ref\\)\\s-+\\(?:mut\\s-+\\)?"
(rust-re-grab rust-re-ident) "\\_>") 1 font-lock-variable-name-face)
;; Type names like `Foo::`, highlight excluding the ::
(,(rust-path-font-lock-matcher rust-re-uc-ident) 1 font-lock-type-face)
- [nongnu] elpa/rust-mode 128601b 317/486: Improve content of `test-project/Cargo.toml'., (continued)
- [nongnu] elpa/rust-mode 128601b 317/486: Improve content of `test-project/Cargo.toml'., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 30a9d39 322/486: Merge pull request #221 from Wilfred/highlight_union_contextual_keyword, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6093d38 327/486: Add syntax coloring for type-inferred constants and variables, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 38f7d89 330/486: Fix recognition of "<" as operator in some context, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 0ded5ea 332/486: Add support for u128 and i128 types, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f57a8eb 333/486: Merge pull request #233 from shanavas786/add-128, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6b71c0a 348/486: fix rust--format-call, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode a90730f 349/486: don't set-window-start for selected window, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 27911c8 351/486: Merge pull request #251 from brotzeit/rust-format-buffer, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 216faf2 353/486: Do not indent where clause by default (follow standard) #257, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode e201404 367/486: Fix font-locking of "let ref",
ELPA Syncer <=
- [nongnu] elpa/rust-mode 8d32dc6 370/486: Add keywords `async` and `try`, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 54a9c3d 380/486: Merge pull request #296 from dekellum/indent-return-type-defcustom, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode ce7a27f 381/486: Add compilation mode warning face, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode c1059d6 387/486: Added angle bracket tests, some of which fail without the fix, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 06f1c68 389/486: Merge pull request #300 from mmilenko/rust-looking-back-macro--backward-char--fix, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 48290d3 399/486: Merge pull request #318 from kraai/patch-1, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f6ebcbd 400/486: Update travis scripts to use EVM, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 077cba7 402/486: Add local docker based tests runner, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 1d42d69 416/486: Speed up line indentation inside strings (#313), ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 4a7a860 480/486: Properly markup two additional section headings, ELPA Syncer, 2021/08/07