From 4f39b02118c0dbd6da97c51bd14a9c9bc862c2c4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Nov 2001 16:11:33 +0000 Subject: [PATCH] (popup-menu): If the user refuses to select from a menu, don't try to invoke the menu. --- lisp/ChangeLog | 5 +++++ lisp/mouse.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1fcf6bbb161..abbc114644f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2001-11-03 Richard M. Stallman + + * mouse.el (popup-menu): If the user refuses to select + from a menu, don't try to invoke the menu. + 2001-11-03 Eli Zaretskii * frame.el (set-background-color, set-foreground-color): Call diff --git a/lisp/mouse.el b/lisp/mouse.el index 93a374f3ff1..19b2c82dc6f 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -90,7 +90,9 @@ PREFIX is the prefix argument (if any) to pass to the command." (message "") ;; Maybe try again but with the submap. (setq map (if (keymapp cmd) cmd))) - (when (functionp cmd) + ;; If the user did not cancel by refusing to select, + ;; and if the result is a command, run it. + (when (and (null map) (commandp cmd)) (setq prefix-arg prefix) ;; `setup-specified-language-environment', for instance, ;; expects this to be set from a menu keymap. -- 2.39.2