From 97ae4b89479b9eec8f7b020404c6435e7a752f5b Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 30 Mar 1997 19:58:28 +0000 Subject: [PATCH] (Faccessible_keymaps): When metizing, convert a string to a vector. But don't metize a character that is part of PREFIX. --- src/keymap.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/keymap.c b/src/keymap.c index 2cecfcd3762..536b27dae7e 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1327,6 +1327,8 @@ then the value includes only maps for prefixes that start with PREFIX.") thismap = Fcdr (Fcar (tail)); last = make_number (XINT (Flength (thisseq)) - 1); is_metized = (XINT (last) >= 0 + /* Don't metize the last char of PREFIX. */ + && XINT (last) >= prefixlen && EQ (Faref (thisseq, last), meta_prefix_char)); for (; CONSP (thismap); thismap = XCONS (thismap)->cdr) @@ -1406,9 +1408,12 @@ then the value includes only maps for prefixes that start with PREFIX.") turn it into a meta-ized keystroke. */ if (is_metized && INTEGERP (elt)) { - tem = Fcopy_sequence (thisseq); - Faset (tem, last, - make_number (XINT (elt) | meta_modifier)); + Lisp_Object element; + + element = thisseq; + tem = Fvconcat (1, &element); + XVECTOR (tem)->contents[XINT (last)] + = XINT (elt) | meta_modifier; /* This new sequence is the same length as thisseq, so stick it in the list right -- 2.39.2