Commit 67fc16a3 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Faccessible_keymaps): Convert PREFIX to a vector

at the beginning, if it has any definition.
parent d27497e3
......@@ -1300,7 +1300,26 @@ then the value includes only maps for prefixes that start with PREFIX.")
It might even give us a list that isn't a keymap. */
tem = get_keymap_1 (tem, 0, 0);
if (!NILP (tem))
maps = Fcons (Fcons (prefix, tem), Qnil);
/* Convert PREFIX to a vector now, so that later on
we don't have to deal with the possibility of a string. */
if (STRINGP (prefix))
int i;
Lisp_Object copy;
copy = Fmake_vector (make_number (XSTRING (prefix)->size), Qnil);
for (i = 0; i < XSTRING (prefix)->size; i++)
int c = XSTRING (prefix)->data[i];
if (c & 0200)
c ^= 0200 | meta_modifier;
XVECTOR (copy)->contents[i] = make_number (c);
prefix = copy;
maps = Fcons (Fcons (prefix, tem), Qnil);
return Qnil;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment