mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-07 06:50:23 -08:00
(popup-menu): Add loop to handle submenus.
This commit is contained in:
parent
0b312d0831
commit
d06752db2d
1 changed files with 10 additions and 5 deletions
|
|
@ -132,11 +132,16 @@ The syntax, more precisely:
|
|||
(let ((menu (make-lucid-menu-keymap (car menu-desc) (cdr menu-desc)))
|
||||
(pos (mouse-position))
|
||||
answer)
|
||||
(setq answer (x-popup-menu (list (list (nth 1 pos) (nthcdr 2 pos))
|
||||
(car pos))
|
||||
menu))
|
||||
(setq cmd (lookup-key menu (vector answer)))
|
||||
(if cmd (call-interactively cmd))))
|
||||
(while menu
|
||||
(setq answer (x-popup-menu (list (list (nth 1 pos) (nthcdr 2 pos))
|
||||
(car pos))
|
||||
menu))
|
||||
(setq cmd (lookup-key menu (vector answer)))
|
||||
(setq menu nil)
|
||||
(and cmd
|
||||
(if (keymapp cmd)
|
||||
(setq menu cmd)
|
||||
(call-interactively cmd))))))
|
||||
|
||||
;; This is empty because the usual elements of the menu bar
|
||||
;; are provided by menu-bar.el instead.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue