[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rust-mode 061e6d8 214/486: Merge pull request #109 from mr
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rust-mode 061e6d8 214/486: Merge pull request #109 from mrBliss/highlight-unsafe |
Date: |
Sat, 7 Aug 2021 09:25:21 -0400 (EDT) |
branch: elpa/rust-mode
commit 061e6d8a3a9104570144f1eacb729e3211cb03cd
Merge: b874bbe 339afba
Author: Micah Chalmer <micah@micahchalmer.net>
Commit: Micah Chalmer <micah@micahchalmer.net>
Merge pull request #109 from mrBliss/highlight-unsafe
Highlight the unsafe keyword
---
rust-mode.el | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/rust-mode.el b/rust-mode.el
index a2c81f7..8049273 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -180,6 +180,11 @@ function or trait. When nil, where will be aligned with
fn or trait."
:safe #'booleanp
:group 'rust-mode)
+(defface rust-unsafe-face
+ '((t :inherit font-lock-warning-face))
+ "Face for the `unsafe' keyword."
+ :group 'rust-mode)
+
(defun rust-paren-level () (nth 0 (syntax-ppss)))
(defun rust-in-str-or-cmnt () (nth 8 (syntax-ppss)))
(defun rust-rewind-past-str-cmnt () (goto-char (nth 8 (syntax-ppss))))
@@ -488,7 +493,7 @@ function or trait. When nil, where will be aligned with fn
or trait."
"ref" "return"
"self" "static" "struct" "super"
"true" "trait" "type"
- "unsafe" "use"
+ "use"
"virtual"
"where" "while"))
@@ -529,6 +534,9 @@ function or trait. When nil, where will be aligned with fn
or trait."
;; Special types
(,(regexp-opt-symbols rust-special-types) . font-lock-type-face)
+ ;; The unsafe keyword
+ ("\\_<unsafe\\_>" . 'rust-unsafe-face)
+
;; Attributes like `#[bar(baz)]` or `#![bar(baz)]` or `#[bar = "baz"]`
(,(rust-re-grab (concat "#\\!?\\[" rust-re-ident "[^]]*\\]"))
1 font-lock-preprocessor-face keep)
- [nongnu] elpa/rust-mode ee564d5 185/486: Merge pull request #85 from talchas/master, (continued)
- [nongnu] elpa/rust-mode ee564d5 185/486: Merge pull request #85 from talchas/master, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 99b128c 187/486: Fix slowness in angle bracket matching, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5e77aed 191/486: Correcting highlighting of capitals in function names., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 5e51aaa 194/486: Merge pull request #69 from tromey/safe-local-variables, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 012537b 195/486: remove byte-compiler warnings and prevent future ones, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 866df37 196/486: make rust-mode use lexical binding, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6252cf1 217/486: Fix indentation of closing delimiters, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode dd6d417 215/486: Fix type annotations incorrectly highlighted as modules., ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 86d636a 223/486: Remove duplicate keywords, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode b1cca0f 222/486: Merge pull request #72 from birkenfeld/builtin-face, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 061e6d8 214/486: Merge pull request #109 from mrBliss/highlight-unsafe,
ELPA Syncer <=
- [nongnu] elpa/rust-mode 86c55b1 220/486: Integrate rustfmt support, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode beec95a 231/486: Allow disabling rustfmt with a dir-local/file-local variable, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 6739dd9 226/486: Merge pull request #123 from birkenfeld/fix-unicode-char-escapes, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode f408b06 227/486: Run the after-revert hook after rustfmt, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode bc0df03 235/486: Merge pull request #135 from Stebalien/file-local, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 9812232 236/486: Document how to install on Debian, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode bfe24d2 237/486: Merge pull request #132 from tomjakubowski/move-module, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 1c37249 238/486: Merge pull request #136 from Stebalien/indent-brace, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode bd44088 239/486: Merge pull request #138 from kraai/upstream, ELPA Syncer, 2021/08/07
- [nongnu] elpa/rust-mode 18fad39 242/486: Merge pull request #142 from tromey/remove-emacs-23-support, ELPA Syncer, 2021/08/07