1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 12:21:25 -08:00

(Fstart_kbd_macro): If appending, and last keyboard

macro is a string, convert meta modifiers in string when copying
the string into a vector.
This commit is contained in:
Kim F. Storm 2003-02-12 11:08:36 +00:00
parent 838e4c5a03
commit 295fff2c70
2 changed files with 17 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2003-02-12 Kim F. Storm <storm@cua.dk>
* macros.c (Fstart_kbd_macro): If appending, and last keyboard
macro is a string, convert meta modifiers in string when copying
the string into a vector.
2003-02-11 Kim F. Storm <storm@cua.dk>
* keymap.c (Fremap_command): Return nil if arg is not a symbol.

View file

@ -93,6 +93,7 @@ macro before appending to it. */)
else
{
int i, len;
int cvt;
/* Check the type of last-kbd-macro in case Lisp code changed it. */
if (!STRINGP (current_kboard->Vlast_kbd_macro)
@ -111,9 +112,17 @@ macro before appending to it. */)
= (Lisp_Object *)xrealloc (current_kboard->kbd_macro_buffer,
(len + 30) * sizeof (Lisp_Object));
}
/* Must convert meta modifier when copying string to vector. */
cvt = STRINGP (current_kboard->Vlast_kbd_macro);
for (i = 0; i < len; i++)
current_kboard->kbd_macro_buffer[i]
= Faref (current_kboard->Vlast_kbd_macro, make_number (i));
{
Lisp_Object c;
c = Faref (current_kboard->Vlast_kbd_macro, make_number (i));
if (cvt && INTEGERP (c) && (XINT (c) & 0x80))
c = XSETFASTINT (c, CHAR_META | (XINT (c) & ~0x80));
current_kboard->kbd_macro_buffer[i] = c;
}
current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_buffer + len;
current_kboard->kbd_macro_end = current_kboard->kbd_macro_ptr;