summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lmenu.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1994-06-25 01:42:43 +0000
committerKarl Heuer <kwzh@gnu.org>1994-06-25 01:42:43 +0000
commitc2883947bdd5db4c02934a33592d17a7e6c259b2 (patch)
treecd343eb82beafb12be245b1c22955286b7b5f9fe /lisp/emacs-lisp/lmenu.el
parent4c90b05900b7aa933fd41996051e4917c178b060 (diff)
downloademacs-c2883947bdd5db4c02934a33592d17a7e6c259b2.tar.gz
(popup-menu): Allow user to select nothing.
Diffstat (limited to 'lisp/emacs-lisp/lmenu.el')
-rw-r--r--lisp/emacs-lisp/lmenu.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/lmenu.el b/lisp/emacs-lisp/lmenu.el
index 6319ff3936b..9d4855fcc1f 100644
--- a/lisp/emacs-lisp/lmenu.el
+++ b/lisp/emacs-lisp/lmenu.el
@@ -135,10 +135,11 @@ The syntax, more precisely:
(let ((menu (make-lucid-menu-keymap (car menu-desc) (cdr menu-desc)))
(pos (mouse-pixel-position))
answer cmd)
- (while menu
- (setq answer (x-popup-menu (list (list (nth 1 pos) (nthcdr 2 pos))
- (car pos))
- menu))
+ (while (and menu
+ (setq answer (x-popup-menu (list (list (nth 1 pos)
+ (nthcdr 2 pos))
+ (car pos))
+ menu)))
(setq cmd (lookup-key menu (apply 'vector answer)))
(setq menu nil)
(and cmd