changeset 43504:20832766c3e1

(Flookup_key): Fixed problem in 2001-12-28 patch: The validation of the event type was too strict as it didn't allow string events; buffer names are used in bindings for menu-bar-select-buffer (see `menu-bar-update-buffers').
author Kim F. Storm <storm@cua.dk>
date Sun, 24 Feb 2002 00:23:20 +0000
parents 324295ebaf57
children 96f6a6230fe9
files src/keymap.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Sat Feb 23 23:42:31 2002 +0000
+++ b/src/keymap.c	Sun Feb 24 00:23:20 2002 +0000
@@ -1142,7 +1142,9 @@
       if (XINT (c) & 0x80 && STRINGP (key))
 	XSETINT (c, (XINT (c) | meta_modifier) & ~0x80);
 
-      if (!INTEGERP (c) && !SYMBOLP (c) && !CONSP (c))
+      /* Allow string since binding for `menu-bar-select-buffer'
+	 includes the buffer name in the key sequence.  */
+      if (!INTEGERP (c) && !SYMBOLP (c) && !CONSP (c) && !STRINGP (c))
 	error ("Key sequence contains invalid event");
 
       cmd = access_keymap (keymap, c, t_ok, 0, 1);