aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2003-02-12 11:08:36 +0000
committerKim F. Storm2003-02-12 11:08:36 +0000
commit295fff2c70e4b6dfef984ec01bc3ba05ff2ad5d2 (patch)
tree91db4b7d73224357b7160e94d58c265ae57992a7 /src
parent838e4c5a036e79775dfcc2957ff943f9dca4e8ff (diff)
downloademacs-295fff2c70e4b6dfef984ec01bc3ba05ff2ad5d2.tar.gz
emacs-295fff2c70e4b6dfef984ec01bc3ba05ff2ad5d2.zip
(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')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/macros.c13
2 files changed, 17 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 04abcc37c58..32c72798647 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12003-02-12 Kim F. Storm <storm@cua.dk>
2
3 * macros.c (Fstart_kbd_macro): If appending, and last keyboard
4 macro is a string, convert meta modifiers in string when copying
5 the string into a vector.
6
12003-02-11 Kim F. Storm <storm@cua.dk> 72003-02-11 Kim F. Storm <storm@cua.dk>
2 8
3 * keymap.c (Fremap_command): Return nil if arg is not a symbol. 9 * keymap.c (Fremap_command): Return nil if arg is not a symbol.
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. */)
93 else 93 else
94 { 94 {
95 int i, len; 95 int i, len;
96 int cvt;
96 97
97 /* Check the type of last-kbd-macro in case Lisp code changed it. */ 98 /* Check the type of last-kbd-macro in case Lisp code changed it. */
98 if (!STRINGP (current_kboard->Vlast_kbd_macro) 99 if (!STRINGP (current_kboard->Vlast_kbd_macro)
@@ -111,9 +112,17 @@ macro before appending to it. */)
111 = (Lisp_Object *)xrealloc (current_kboard->kbd_macro_buffer, 112 = (Lisp_Object *)xrealloc (current_kboard->kbd_macro_buffer,
112 (len + 30) * sizeof (Lisp_Object)); 113 (len + 30) * sizeof (Lisp_Object));
113 } 114 }
115
116 /* Must convert meta modifier when copying string to vector. */
117 cvt = STRINGP (current_kboard->Vlast_kbd_macro);
114 for (i = 0; i < len; i++) 118 for (i = 0; i < len; i++)
115 current_kboard->kbd_macro_buffer[i] 119 {
116 = Faref (current_kboard->Vlast_kbd_macro, make_number (i)); 120 Lisp_Object c;
121 c = Faref (current_kboard->Vlast_kbd_macro, make_number (i));
122 if (cvt && INTEGERP (c) && (XINT (c) & 0x80))
123 c = XSETFASTINT (c, CHAR_META | (XINT (c) & ~0x80));
124 current_kboard->kbd_macro_buffer[i] = c;
125 }
117 126
118 current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_buffer + len; 127 current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_buffer + len;
119 current_kboard->kbd_macro_end = current_kboard->kbd_macro_ptr; 128 current_kboard->kbd_macro_end = current_kboard->kbd_macro_ptr;