branch: elpa/markdown-mode
commit dd2cb2cdcd6594c3663cda20b465f09c773fcc90
Merge: 5bf29873b6 3ed9a17202
Author: Shohei YOSHIDA <syo...@gmail.com>
Commit: GitHub <nore...@github.com>

    Merge pull request #888 from jrblevin/issue-882
    
    Disable `imenu-submenus-on-top` by default
---
 CHANGES.md       | 3 +++
 markdown-mode.el | 8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index 9d1f0379f6..673334bb6f 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -14,6 +14,9 @@
 *   Improvements:
     - Support drag and drop features on Windows and multiple files' drag and 
drop
     - Added cmark and cmark-gfm to the markdown command list.
+    - Disable `imenu-submenus-on-top` by default [GH-882][]
+
+  [gh-882]: https://github.com/jrblevin/markdown-mode/issues/882
 
 # Markdown Mode 2.7
 
diff --git a/markdown-mode.el b/markdown-mode.el
index 1bdd0b1ec3..e9d9bec8fc 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -10231,10 +10231,10 @@ rows and columns and the column alignment."
   ;; Add a buffer-local hook to reload after file-local variables are read
   (add-hook 'hack-local-variables-hook #'markdown-handle-local-variables nil t)
   ;; For imenu support
-  (setq imenu-create-index-function
-        (if markdown-nested-imenu-heading-index
-            #'markdown-imenu-create-nested-index
-          #'markdown-imenu-create-flat-index))
+  (setq-local imenu-create-index-function (if 
markdown-nested-imenu-heading-index
+                                              
#'markdown-imenu-create-nested-index
+                                            #'markdown-imenu-create-flat-index)
+              imenu-submenus-on-top nil)
 
   ;; Defun movement
   (setq-local beginning-of-defun-function #'markdown-beginning-of-defun)

Reply via email to