mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-09 05:01:02 -08:00
Let imenu to work on the menu bar when its list is a single non-nested member.
* lisp/imenu.el (imenu-update-menubar): No longer accept a list of length 1 as being sufficient evidence for a nested list structure. Instead, additionally check whether or not certain elements are atoms.
This commit is contained in:
parent
c6e0981b96
commit
650a664ccd
1 changed files with 9 additions and 5 deletions
|
|
@ -911,11 +911,15 @@ to `imenu-update-menubar'.")
|
|||
(setq index-alist (imenu--split-submenus index-alist))
|
||||
(let* ((menu (imenu--split-menu index-alist
|
||||
(buffer-name)))
|
||||
(menu1 (imenu--create-keymap (car menu)
|
||||
(cdr (if (< 1 (length (cdr menu)))
|
||||
menu
|
||||
(car (cdr menu))))
|
||||
'imenu--menubar-select)))
|
||||
(menu1 (imenu--create-keymap
|
||||
(car menu)
|
||||
(cdr (if (or (< 1 (length (cdr menu)))
|
||||
;; Have we a non-nested single entry?
|
||||
(atom (cdadr menu))
|
||||
(atom (cadadr menu)))
|
||||
menu
|
||||
(car (cdr menu))))
|
||||
'imenu--menubar-select)))
|
||||
(setcdr imenu--menubar-keymap (cdr menu1)))))))
|
||||
|
||||
(defun imenu--menubar-select (item)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue