# HG changeset patch # User Karl Heuer # Date 772508563 0 # Node ID a320525f4d8fc80dfc8c675baf64b602144c095e # Parent bef2c11470f8b769e67d9516958b6b4ed1a5ecd9 (popup-menu): Allow user to select nothing. diff -r bef2c11470f8 -r a320525f4d8f lisp/emacs-lisp/lmenu.el --- a/lisp/emacs-lisp/lmenu.el Sat Jun 25 01:20:11 1994 +0000 +++ b/lisp/emacs-lisp/lmenu.el Sat Jun 25 01:42:43 1994 +0000 @@ -135,10 +135,11 @@ (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