From cc59c8387fde46b673a1784c60ff5117ed82eef0 Mon Sep 17 00:00:00 2001 From: mrBliss Date: Wed, 19 Oct 2016 14:26:51 +0200 Subject: Recognize imenu items starting with "unsafe" --- rust-mode.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'rust-mode.el') diff --git a/rust-mode.el b/rust-mode.el index 2c97433..b5f62cb 100644 --- a/rust-mode.el +++ b/rust-mode.el @@ -32,6 +32,7 @@ (defconst rust-re-lc-ident "[[:lower:][:multibyte:]_][[:word:][:multibyte:]_[:digit:]]*") (defconst rust-re-uc-ident "[[:upper:]][[:word:][:multibyte:]_[:digit:]]*") (defconst rust-re-vis "pub") +(defconst rust-re-unsafe "unsafe") (defconst rust-re-non-standard-string (rx @@ -556,6 +557,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 rust-re-unsafe) "[[:space:]]+")) "?" (rust-re-item-def itype))) (defconst rust-re-special-types (regexp-opt rust-special-types 'symbols)) -- cgit v1.2.3