# HG changeset patch # User Kim F. Storm # Date 1045048104 0 # Node ID 282c490f6cd4ce4b7cad153b4f2d7d65c5f2c2b6 # Parent d15ccf22e8e885603279e6f8379c2197b546dc7c (Fstart_kbd_macro): If appending, and last keyboard macro is a string, convert meta modifiers in string when copying the string into a vector. diff -r d15ccf22e8e8 -r 282c490f6cd4 src/macros.c --- a/src/macros.c Wed Feb 12 10:21:27 2003 +0000 +++ b/src/macros.c Wed Feb 12 11:08:24 2003 +0000 @@ -93,6 +93,7 @@ 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 @@ = (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;