]> code.delx.au - gnu-emacs/commitdiff
Merge changes from emacs-23
authorChong Yidong <cyd@stupidchicken.com>
Sat, 1 Oct 2011 18:46:45 +0000 (14:46 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 1 Oct 2011 18:46:45 +0000 (14:46 -0400)
src/ChangeLog
src/keymap.c

index 238e3faae513e2573551c796eadce4e995437563..f9283730ebf2ca77414a35e1fab92d24f20ae5cb 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-01  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * keymap.c (Fsingle_key_description): Use make_specified_string
+       instead of build_string to build string from push_key_description.
+       (Bug#5193)
+
 2011-09-30  Paul Eggert  <eggert@cs.ucla.edu>
 
        * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
index 4485080db21d0d961811fe8f5e26dcc21a4d0bcb..739dfd8f2dec9fc274a57c570b2f28aa08011b92 100644 (file)
@@ -2274,10 +2274,11 @@ around function keys and event symbols.  */)
 
   if (INTEGERP (key))          /* Normal character */
     {
-      char tem[KEY_DESCRIPTION_SIZE];
+      char tem[KEY_DESCRIPTION_SIZE], *p;
 
-      *push_key_description (XINT (key), tem, 1) = 0;
-      return build_string (tem);
+      p = push_key_description (XINT (key), tem, 1);
+      *p = 0;
+      return make_specified_string (tem, -1, p - tem, 1);
     }
   else if (SYMBOLP (key))      /* Function key or event-symbol */
     {