diff options
| author | Richard M. Stallman <rms@gnu.org> | 1993-06-06 06:45:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1993-06-06 06:45:22 +0000 |
| commit | 2732bdbbbfca21280f00fb9344323c152b138885 (patch) | |
| tree | a4a2c8f989ac1d1a86fd14546f56c3301d7fa00f /src/keymap.c | |
| parent | d4ece6796d81a6b36877528c91d38fb31c1982be (diff) | |
| download | emacs-2732bdbbbfca21280f00fb9344323c152b138885.tar.gz | |
(access_keymap, store_in_keymap): Discard meaningless
high bits of a character event.
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/keymap.c b/src/keymap.c index 7831c293316..107c2ec3b87 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -272,6 +272,10 @@ access_keymap (map, idx, t_ok) be put in the canonical order. */ if (XTYPE (idx) == Lisp_Symbol) idx = reorder_modifiers (idx); + else if (INTEGERP (idx)) + /* Clobber the high bits that can be present on a machine + with more than 24 bits of integer. */ + XFASTINT (idx) = XINT (idx) & ((1 << 24) - 1); { Lisp_Object tail; @@ -368,7 +372,10 @@ store_in_keymap (keymap, idx, def) be put in the canonical order. */ if (XTYPE (idx) == Lisp_Symbol) idx = reorder_modifiers (idx); - + else if (INTEGERP (idx)) + /* Clobber the high bits that can be present on a machine + with more than 24 bits of integer. */ + XFASTINT (idx) = XINT (idx) & ((1 << 24) - 1); /* Scan the keymap for a binding of idx. */ { |
