Mercurial > emacs
changeset 5439:77798fccc85c
(popup-menu): Add loop to handle submenus.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 04 Jan 1994 23:30:37 +0000 |
parents | ab37f52a4fe3 |
children | 856ecdc5228a |
files | lisp/emacs-lisp/lmenu.el |
diffstat | 1 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emacs-lisp/lmenu.el Tue Jan 04 14:21:54 1994 +0000 +++ b/lisp/emacs-lisp/lmenu.el Tue Jan 04 23:30:37 1994 +0000 @@ -132,11 +132,16 @@ (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.