summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-05-23 17:33:32 +0000
committerRichard M. Stallman <rms@gnu.org>1997-05-23 17:33:32 +0000
commit6b3771e0f00bccb6d608f0f2054b8f9176d9d80a (patch)
tree5bd4d916c6b7d7f469294e34cb4428964fec2a7f /src
parent8bcfd5ffd9ef7f9efeef64c08f18e3f20423ed5a (diff)
downloademacs-6b3771e0f00bccb6d608f0f2054b8f9176d9d80a.tar.gz
(access_keymap, store_in_keymap): Don't look in a char-table
for a character that has modifier bits.
Diffstat (limited to 'src')
-rw-r--r--src/keymap.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/keymap.c b/src/keymap.c
index 6a08a86ef47..32c4afb322d 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -484,7 +484,13 @@ access_keymap (map, idx, t_ok, noinherit)
}
else if (CHAR_TABLE_P (binding))
{
- if (NATNUMP (idx))
+ /* Character codes with modifiers
+ are not included in a char-table.
+ All character codes without modifiers are included. */
+ if (NATNUMP (idx)
+ && ! (XFASTINT (idx)
+ & (CHAR_ALT | CHAR_SUPER | CHAR_HYPER
+ | CHAR_SHIFT | CHAR_CTL | CHAR_META)))
{
val = Faref (binding, idx);
if (noprefix && CONSP (val) && EQ (XCONS (val)->car, Qkeymap))
@@ -629,7 +635,13 @@ store_in_keymap (keymap, idx, def)
}
else if (CHAR_TABLE_P (elt))
{
- if (NATNUMP (idx))
+ /* Character codes with modifiers
+ are not included in a char-table.
+ All character codes without modifiers are included. */
+ if (NATNUMP (idx)
+ && ! (XFASTINT (idx)
+ & (CHAR_ALT | CHAR_SUPER | CHAR_HYPER
+ | CHAR_SHIFT | CHAR_CTL | CHAR_META)))
{
Faset (elt, idx, def);
return def;