emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rust-mode c69adaf 254/486: Add menu titles for items in im


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode c69adaf 254/486: Add menu titles for items in imenu
Date: Sat, 7 Aug 2021 09:25:30 -0400 (EDT)

branch: elpa/rust-mode
commit c69adaf8ea5b2bdf56d7ae9a54a0a86b28fd9418
Author: fmdkdd <fmdkdd@gmail.com>
Commit: fmdkdd <fmdkdd@gmail.com>

    Add menu titles for items in imenu
    
    All items gathered by imenu were put at the top-level, except impls.
    
    This commit puts all items in separate menu titles, following "Impl".
    
    Fixes #93.
---
 rust-mode.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/rust-mode.el b/rust-mode.el
index 65fc1fd..16aaa6d 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1195,16 +1195,15 @@ the desired identifiers), but does not match type 
annotations \"foo::<\"."
 ;;; Imenu support
 (defvar rust-imenu-generic-expression
   (append (mapcar #'(lambda (x)
-                      (list nil (rust-re-item-def-imenu x) 1))
-                  '("enum" "struct" "type" "mod" "fn" "trait" "macro_rules!"))
-          `(("Impl" ,(rust-re-item-def-imenu "impl") 1)))
+                      (list (capitalize x) (rust-re-item-def-imenu x) 1))
+                  '("enum" "struct" "type" "mod" "fn" "trait" "impl"))
+          `(("Macro" ,(rust-re-item-def-imenu "macro_rules!") 1)))
   "Value for `imenu-generic-expression' in Rust mode.
 
-Create a flat index of the item definitions in a Rust file.
+Create a hierarchical index of the item definitions in a Rust file.
 
-Imenu will show all the enums, structs, etc. at the same level.
-Implementations will be shown under the `Impl` subheading.  Use
-idomenu (imenu with `ido-mode') for best mileage.")
+Imenu will show all the enums, structs, etc. in their own subheading.
+Use idomenu (imenu with `ido-mode') for best mileage.")
 
 ;;; Defun Motions
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]