aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
authorStefan Monnier2007-05-07 15:41:37 +0000
committerStefan Monnier2007-05-07 15:41:37 +0000
commit5df399983383a04e3603074c0528ba140e22b01b (patch)
treef3f050f61c2962d1a2a7bd26b2a73ed09fcdbf73 /src/keymap.c
parent59c58feafb764126fa08e1a3560cb158817f556e (diff)
downloademacs-5df399983383a04e3603074c0528ba140e22b01b.tar.gz
emacs-5df399983383a04e3603074c0528ba140e22b01b.zip
(Fdefine_key, Flookup_key): Only do the 0x80->meta_modifier
mapping for unibyte strings.
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/keymap.c b/src/keymap.c
index c61f5f34383..145d872863a 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1156,7 +1156,8 @@ binding KEY to DEF is added at the front of KEYMAP. */)
1156 if (SYMBOLP (def) && !EQ (Vdefine_key_rebound_commands, Qt)) 1156 if (SYMBOLP (def) && !EQ (Vdefine_key_rebound_commands, Qt))
1157 Vdefine_key_rebound_commands = Fcons (def, Vdefine_key_rebound_commands); 1157 Vdefine_key_rebound_commands = Fcons (def, Vdefine_key_rebound_commands);
1158 1158
1159 meta_bit = VECTORP (key) ? meta_modifier : 0x80; 1159 meta_bit = (VECTORP (key) || STRINGP (key) && STRING_MULTIBYTE (key)
1160 ? meta_modifier : 0x80);
1160 1161
1161 if (VECTORP (def) && ASIZE (def) > 0 && CONSP (AREF (def, 0))) 1162 if (VECTORP (def) && ASIZE (def) > 0 && CONSP (AREF (def, 0)))
1162 { /* DEF is apparently an XEmacs-style keyboard macro. */ 1163 { /* DEF is apparently an XEmacs-style keyboard macro. */
@@ -1312,7 +1313,7 @@ recognize the default bindings, just as `read-key-sequence' does. */)
1312 c = Fevent_convert_list (c); 1313 c = Fevent_convert_list (c);
1313 1314
1314 /* Turn the 8th bit of string chars into a meta modifier. */ 1315 /* Turn the 8th bit of string chars into a meta modifier. */
1315 if (INTEGERP (c) && XINT (c) & 0x80 && STRINGP (key)) 1316 if (STRINGP (key) && XINT (c) & 0x8 && !STRING_MULTIBYTE (key))
1316 XSETINT (c, (XINT (c) | meta_modifier) & ~0x80); 1317 XSETINT (c, (XINT (c) | meta_modifier) & ~0x80);
1317 1318
1318 /* Allow string since binding for `menu-bar-select-buffer' 1319 /* Allow string since binding for `menu-bar-select-buffer'