From 5f245371188ff7793c3d5a79a0d38efd2e04bc57 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 24 Feb 2002 00:24:37 +0000 Subject: [PATCH] (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'). --- src/ChangeLog | 7 +++++++ src/keymap.c | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 99e4b445a3c..4157523f2e4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2002-02-24 Kim F. Storm + + * keymap.c (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'). + 2002-02-23 Kim F. Storm The following changes rework my patch of 2002-02-06 which diff --git a/src/keymap.c b/src/keymap.c index fcb56bd44ae..e56a21a735a 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1142,7 +1142,9 @@ recognize the default bindings, just as `read-key-sequence' does. */) 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); -- 2.39.5