diff options
author | Kim F. Storm <storm@cua.dk> | 2003-02-12 11:08:36 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2003-02-12 11:08:36 +0000 |
commit | 295fff2c70e4b6dfef984ec01bc3ba05ff2ad5d2 (patch) | |
tree | 91db4b7d73224357b7160e94d58c265ae57992a7 /src/macros.c | |
parent | 838e4c5a036e79775dfcc2957ff943f9dca4e8ff (diff) | |
download | emacs-295fff2c70e4b6dfef984ec01bc3ba05ff2ad5d2.tar.gz |
(Fstart_kbd_macro): If appending, and last keyboard
macro is a string, convert meta modifiers in string when copying
the string into a vector.
Diffstat (limited to 'src/macros.c')
-rw-r--r-- | src/macros.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/macros.c b/src/macros.c index 44d44d2c9c1..2b50a491ca4 100644 --- a/src/macros.c +++ b/src/macros.c @@ -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; |