1
Fork 0
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:
Richard M. Stallman 1994-01-04 23:30:37 +00:00
parent 0b312d0831
commit d06752db2d

View file

@ -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.