summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-01-17 11:24:25 -0500
committerGitHub <noreply@github.com>2017-01-17 11:24:25 -0500
commit0de149a9ad04f652cd7a59a9ef67be8a7d86ba76 (patch)
treee3a9b007a561f7a5d5bf2b64f2a45d16fe5d45bd /rust-mode.el
parent8039d1265a79ff229ca9466a4244bdf21a6c2a89 (diff)
parentb8126e4f647ed6a4f79e623752b0b0821f42890e (diff)
downloadrust-mode-0de149a9ad04f652cd7a59a9ef67be8a7d86ba76.tar.gz
Merge pull request #190 from mrBliss/imenu-extern
Recognize "extern" imenu items
Diffstat (limited to 'rust-mode.el')
-rw-r--r--rust-mode.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/rust-mode.el b/rust-mode.el
index 1527c7a..dfe3e9a 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -33,6 +33,7 @@
(defconst rust-re-uc-ident "[[:upper:]][[:word:][:multibyte:]_[:digit:]]*")
(defconst rust-re-vis "pub")
(defconst rust-re-unsafe "unsafe")
+(defconst rust-re-extern "extern")
(defconst rust-re-non-standard-string
(rx
@@ -571,6 +572,8 @@ buffer."
(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-shy (concat (rust-re-word rust-re-extern) "[[:space:]]+"
+ (rust-re-shy "\"[^\"]+\"[[:space:]]+") "?")) "?"
(rust-re-item-def itype)))
(defconst rust-re-special-types (regexp-opt rust-special-types 'symbols))