From 1f5b1641369d2bda6bd3470b1da3aea10c7b3f64 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 26 Dec 1995 04:37:05 +0000 Subject: [PATCH] (read_char_x_menu_prompt): HAVE_X_MENU renamed to HAVE_MENUS. (Fexecute_extended_command): Nice error if empty cmd name. --- src/keyboard.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 08725ba3bea..f20631485ec 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -4925,7 +4925,7 @@ read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu) if (mapno >= nmaps) return Qnil; -#if (defined (HAVE_X_WINDOWS) && defined (HAVE_X_MENU)) || defined (MSDOS) || defined (HAVE_NTGUI) +#ifdef HAVE_MENUS /* If we got to this point via a mouse click, use a real menu for mouse selection. */ if (EVENT_HAS_PARAMETERS (prev_event) @@ -4975,7 +4975,7 @@ read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu) *used_mouse_menu = 1; return value; } -#endif /* (HAVE_X_WINDOWS && HAVE_X_MENU) || MSDOS || HAVE_NTGUI */ +#endif /* HAVE_MENUS */ return Qnil ; } @@ -6492,6 +6492,9 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_ Vobarray, Qcommandp, Qt, Qnil, Qextended_command_history); + if (STRINGP (function) && XSTRING (function)->size == 0) + error ("No command name given"); + /* Set this_command_keys to the concatenation of saved_keys and function, followed by a RET. */ { -- 2.39.2