From be6ed24abaafbbb93aab880523963a38f76cc91a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 1 May 2005 18:49:28 +0000 Subject: [PATCH] [not HAVE_X_TOOLKIT] (xmenu_show): If user cancels the menu, quit unless FOR_CLICK. --- src/xmenu.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/xmenu.c b/src/xmenu.c index 581a5ce6cd2..d86535c47ac 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -2889,6 +2889,9 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) } } } + else if (!for_click) + /* Make "Cancel" equivalent to C-g. */ + Fsignal (Qquit, Qnil); return Qnil; } @@ -3519,8 +3522,8 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) entry = Qnil; break; case XM_NO_SELECT: - /* Make "Cancel" equivalent to C-g unless this menu was popped up by - a mouse press. */ + /* Make "Cancel" equivalent to C-g unless FOR_CLICK (which means + the menu was invoked with a mouse event as POSITION). */ if (! for_click) Fsignal (Qquit, Qnil); entry = Qnil; -- 2.39.2