summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2011-10-01 14:46:45 -0400
committerChong Yidong <cyd@stupidchicken.com>2011-10-01 14:46:45 -0400
commitb6bd159922608fa474026837771d63bf7eadcf97 (patch)
treec8049a810e9e1f511ff9e79b87ba1d27803fd980
parent04c52e2f5bffa157bcec3a9b1d0a57c4df36bfea (diff)
parentfa2ec41ffd2cace14f37f5d18d986b410cb038a1 (diff)
downloademacs-b6bd159922608fa474026837771d63bf7eadcf97.tar.gz
Merge changes from emacs-23
-rw-r--r--src/ChangeLog6
-rw-r--r--src/keymap.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 238e3faae51..f9283730ebf 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/keymap.c b/src/keymap.c
index 4485080db21..739dfd8f2de 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -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 */
{