aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/keymap.c b/src/keymap.c
index a1f0de1c09a..f96c109c9cd 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1959,14 +1959,18 @@ around function keys and event symbols.")
1959 } 1959 }
1960 else 1960 else
1961 { 1961 {
1962 char tem[KEY_DESCRIPTION_SIZE]; 1962 char tem[KEY_DESCRIPTION_SIZE], *end;
1963 int len; 1963 int nbytes, nchars;
1964 1964 Lisp_Object string;
1965 *push_key_description (XUINT (key), tem, 1) = 0; 1965
1966 len = strlen (tem); 1966 end = push_key_description (XUINT (key), tem, 1);
1967 return make_multibyte_string (tem, 1967 nbytes = end - tem;
1968 multibyte_chars_in_text (tem, len), 1968 nchars = multibyte_chars_in_text (tem, nbytes);
1969 len); 1969 if (nchars == nbytes)
1970 string = build_string (tem);
1971 else
1972 string = make_multibyte_string (tem, nchars, nbytes);
1973 return string;
1970 } 1974 }
1971 } 1975 }
1972 else if (SYMBOLP (key)) /* Function key or event-symbol */ 1976 else if (SYMBOLP (key)) /* Function key or event-symbol */