aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/keymap.c b/src/keymap.c
index b860b7565a3..e042f64a099 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1300,7 +1300,26 @@ then the value includes only maps for prefixes that start with PREFIX.")
1300 It might even give us a list that isn't a keymap. */ 1300 It might even give us a list that isn't a keymap. */
1301 tem = get_keymap_1 (tem, 0, 0); 1301 tem = get_keymap_1 (tem, 0, 0);
1302 if (!NILP (tem)) 1302 if (!NILP (tem))
1303 maps = Fcons (Fcons (prefix, tem), Qnil); 1303 {
1304 /* Convert PREFIX to a vector now, so that later on
1305 we don't have to deal with the possibility of a string. */
1306 if (STRINGP (prefix))
1307 {
1308 int i;
1309 Lisp_Object copy;
1310
1311 copy = Fmake_vector (make_number (XSTRING (prefix)->size), Qnil);
1312 for (i = 0; i < XSTRING (prefix)->size; i++)
1313 {
1314 int c = XSTRING (prefix)->data[i];
1315 if (c & 0200)
1316 c ^= 0200 | meta_modifier;
1317 XVECTOR (copy)->contents[i] = make_number (c);
1318 }
1319 prefix = copy;
1320 }
1321 maps = Fcons (Fcons (prefix, tem), Qnil);
1322 }
1304 else 1323 else
1305 return Qnil; 1324 return Qnil;
1306 } 1325 }