diff options
| author | Karl Heuer | 1994-06-25 01:42:43 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-06-25 01:42:43 +0000 |
| commit | 9f04f0237a69d7c488ca4ccbe8a96f86f8820c8d (patch) | |
| tree | 2dddba03261462e7f4b3775d89bcf0136aaad42c | |
| parent | d196a64d03b44cbb514f6b1dda795f30f7acb3cd (diff) | |
| download | emacs-9f04f0237a69d7c488ca4ccbe8a96f86f8820c8d.tar.gz emacs-9f04f0237a69d7c488ca4ccbe8a96f86f8820c8d.zip | |
(popup-menu): Allow user to select nothing.
| -rw-r--r-- | lisp/emacs-lisp/lmenu.el | 9 |
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: | |||
| 135 | (let ((menu (make-lucid-menu-keymap (car menu-desc) (cdr menu-desc))) | 135 | (let ((menu (make-lucid-menu-keymap (car menu-desc) (cdr menu-desc))) |
| 136 | (pos (mouse-pixel-position)) | 136 | (pos (mouse-pixel-position)) |
| 137 | answer cmd) | 137 | answer cmd) |
| 138 | (while menu | 138 | (while (and menu |
| 139 | (setq answer (x-popup-menu (list (list (nth 1 pos) (nthcdr 2 pos)) | 139 | (setq answer (x-popup-menu (list (list (nth 1 pos) |
| 140 | (car pos)) | 140 | (nthcdr 2 pos)) |
| 141 | menu)) | 141 | (car pos)) |
| 142 | menu))) | ||
| 142 | (setq cmd (lookup-key menu (apply 'vector answer))) | 143 | (setq cmd (lookup-key menu (apply 'vector answer))) |
| 143 | (setq menu nil) | 144 | (setq menu nil) |
| 144 | (and cmd | 145 | (and cmd |