From bc5bc7f13ae52e61c1eeb5ce5f898b9c04212dce Mon Sep 17 00:00:00 2001 From: brotzeit Date: Fri, 22 Oct 2021 21:01:17 +0200 Subject: update regexes used in rust-top-item-beg-re --- rust-mode.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rust-mode.el') diff --git a/rust-mode.el b/rust-mode.el index 58897fd..f513065 100644 --- a/rust-mode.el +++ b/rust-mode.el @@ -267,7 +267,7 @@ Use idomenu (imenu with `ido-mode') for best mileage.") (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode)) (defvar rust-top-item-beg-re - (concat "\\s-*" + (concat "\\s-*\\(?:priv\\|pub\\)?\\s-*" ;; TODO some of this does only make sense for `fn' (unsafe, extern...) ;; and not other items (rust-re-shy (concat (rust-re-shy rust-re-vis) "[[:space:]]+")) "?" @@ -275,7 +275,7 @@ Use idomenu (imenu with `ido-mode') for best mileage.") (rust-re-shy (concat (rust-re-shy rust-re-unsafe) "[[:space:]]+")) "?" (regexp-opt '("enum" "struct" "union" "type" "mod" "use" "fn" "static" "impl" - "extern" "trait")) + "extern" "trait" "async")) "\\_>") "Start of a Rust item.") -- cgit v1.2.3