diff options
| author | Tom Tromey <tom@tromey.com> | 2017-04-25 15:58:33 -0600 |
|---|---|---|
| committer | Tom Tromey <tom@tromey.com> | 2017-05-06 09:17:32 -0600 |
| commit | 758ab8c6aaa04802223db1eca8c1f7f76c13727d (patch) | |
| tree | ed970e4f49750b78e47650677c57f1226e0827ca /rust-mode.el | |
| parent | dae5af71ebf4b5c6797ef057e8a0ebf655bcdbfb (diff) | |
| download | rust-mode-758ab8c6aaa04802223db1eca8c1f7f76c13727d.tar.gz | |
Add support for "default" keyword
Add context-sensitive fontification for the "default" keyword.
Diffstat (limited to 'rust-mode.el')
| -rw-r--r-- | rust-mode.el | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rust-mode.el b/rust-mode.el index f1c3994..9f9e391 100644 --- a/rust-mode.el +++ b/rust-mode.el @@ -526,6 +526,7 @@ buffer." (defun rust-re-item-def-imenu (itype) (concat "^[[:space:]]*" (rust-re-shy (concat (rust-re-word rust-re-vis) "[[:space:]]+")) "?" + (rust-re-shy (concat (rust-re-word "default") "[[:space:]]+")) "?" (rust-re-shy (concat (rust-re-word rust-re-unsafe) "[[:space:]]+")) "?" (rust-re-shy (concat (rust-re-word rust-re-extern) "[[:space:]]+" (rust-re-shy "\"[^\"]+\"[[:space:]]+") "?")) "?" @@ -555,6 +556,7 @@ the desired identifiers), but does not match type annotations \"foo::<\"." (append `( ;; Keywords proper + ("\\_<\\(default\\)[[:space:]]+fn\\_>" 1 font-lock-keyword-face) (,(regexp-opt rust-mode-keywords 'symbols) . font-lock-keyword-face) ;; Special types |
