diff options
| author | Richard M. Stallman | 1994-01-04 23:30:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-01-04 23:30:37 +0000 |
| commit | d06752db2d8f4f15250624031574f7719a0b3df8 (patch) | |
| tree | 9af70dc1fe8c920700264c37a837dab45fbc03e5 | |
| parent | 0b312d08319768b63c045b8a36013d7ac66aa090 (diff) | |
| download | emacs-d06752db2d8f4f15250624031574f7719a0b3df8.tar.gz emacs-d06752db2d8f4f15250624031574f7719a0b3df8.zip | |
(popup-menu): Add loop to handle submenus.
| -rw-r--r-- | lisp/emacs-lisp/lmenu.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/lmenu.el b/lisp/emacs-lisp/lmenu.el index dc108c14b00..3883d0ed4be 100644 --- a/lisp/emacs-lisp/lmenu.el +++ b/lisp/emacs-lisp/lmenu.el | |||
| @@ -132,11 +132,16 @@ The syntax, more precisely: | |||
| 132 | (let ((menu (make-lucid-menu-keymap (car menu-desc) (cdr menu-desc))) | 132 | (let ((menu (make-lucid-menu-keymap (car menu-desc) (cdr menu-desc))) |
| 133 | (pos (mouse-position)) | 133 | (pos (mouse-position)) |
| 134 | answer) | 134 | answer) |
| 135 | (setq answer (x-popup-menu (list (list (nth 1 pos) (nthcdr 2 pos)) | 135 | (while menu |
| 136 | (car pos)) | 136 | (setq answer (x-popup-menu (list (list (nth 1 pos) (nthcdr 2 pos)) |
| 137 | menu)) | 137 | (car pos)) |
| 138 | (setq cmd (lookup-key menu (vector answer))) | 138 | menu)) |
| 139 | (if cmd (call-interactively cmd)))) | 139 | (setq cmd (lookup-key menu (vector answer))) |
| 140 | (setq menu nil) | ||
| 141 | (and cmd | ||
| 142 | (if (keymapp cmd) | ||
| 143 | (setq menu cmd) | ||
| 144 | (call-interactively cmd)))))) | ||
| 140 | 145 | ||
| 141 | ;; This is empty because the usual elements of the menu bar | 146 | ;; This is empty because the usual elements of the menu bar |
| 142 | ;; are provided by menu-bar.el instead. | 147 | ;; are provided by menu-bar.el instead. |