diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-01-07 07:51:36 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-07 07:51:36 -0500 |
| commit | 5c68cafd46c4bc20ccba08f3f91dfce808c6dffe (patch) | |
| tree | ac3126382288d0b449e8c292d229982c7fdb4633 /rust-mode.el | |
| parent | 8f1297a5f6da4a587abf604756d7a99b046616d5 (diff) | |
| parent | cc59c8387fde46b673a1784c60ff5117ed82eef0 (diff) | |
| download | rust-mode-5c68cafd46c4bc20ccba08f3f91dfce808c6dffe.tar.gz | |
Merge pull request #175 from mrBliss/imenu-unsafe
Recognize imenu items starting with "unsafe"
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 b8f26d3..1527c7a 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 @@ -569,6 +570,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)) |
