From: Andreas Schwab Date: Mon, 19 Sep 2011 21:15:47 +0000 (+0200) Subject: * src/keymap.c (Fsingle_key_description): Use make_specified_string X-Git-Tag: emacs-pretest-24.0.91~231^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fa2ec41ffd2cace14f37f5d18d986b410cb038a1;p=emacs.git * src/keymap.c (Fsingle_key_description): Use make_specified_string instead of build_string to build string from push_key_description. (Bug#5193) --- diff --git a/src/ChangeLog b/src/ChangeLog index fa31b3d6f0e..458e8c89821 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2011-09-19 Andreas Schwab + + * keymap.c (Fsingle_key_description): Use make_specified_string + instead of build_string to build string from push_key_description. + (Bug#5193) + 2011-09-10 YAMAMOTO Mitsuharu * xdisp.c (expose_window): Save original value of phys_cursor_on_p diff --git a/src/keymap.c b/src/keymap.c index dec53cbd8e1..218a2f1828f 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -2529,10 +2529,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 (XUINT (key), tem, 1) = 0; - return build_string (tem); + p = push_key_description (XUINT (key), tem, 1); + *p = 0; + return make_specified_string (tem, -1, p - tem, 1); } else if (SYMBOLP (key)) /* Function key or event-symbol */ {