diff options
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/keymap.c b/src/keymap.c index f5aea3b3902..fb506200a1c 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2120,12 +2120,21 @@ push_key_description (c, p, force_multibyte) | |||
| 2120 | int force_multibyte; | 2120 | int force_multibyte; |
| 2121 | { | 2121 | { |
| 2122 | unsigned c2; | 2122 | unsigned c2; |
| 2123 | int valid_p; | ||
| 2123 | 2124 | ||
| 2124 | /* Clear all the meaningless bits above the meta bit. */ | 2125 | /* Clear all the meaningless bits above the meta bit. */ |
| 2125 | c &= meta_modifier | ~ - meta_modifier; | 2126 | c &= meta_modifier | ~ - meta_modifier; |
| 2126 | c2 = c & ~(alt_modifier | ctrl_modifier | hyper_modifier | 2127 | c2 = c & ~(alt_modifier | ctrl_modifier | hyper_modifier |
| 2127 | | meta_modifier | shift_modifier | super_modifier); | 2128 | | meta_modifier | shift_modifier | super_modifier); |
| 2128 | 2129 | ||
| 2130 | valid_p = SINGLE_BYTE_CHAR_P (c2) || char_valid_p (c2, 0); | ||
| 2131 | if (! valid_p) | ||
| 2132 | { | ||
| 2133 | /* KEY_DESCRIPTION_SIZE is large enough for this. */ | ||
| 2134 | p += sprintf (p, "[%d]", c); | ||
| 2135 | return p; | ||
| 2136 | } | ||
| 2137 | |||
| 2129 | if (c & alt_modifier) | 2138 | if (c & alt_modifier) |
| 2130 | { | 2139 | { |
| 2131 | *p++ = 'A'; | 2140 | *p++ = 'A'; |
| @@ -3310,7 +3319,9 @@ describe_map (map, prefix, elt_describer, partial, shadow, | |||
| 3310 | tem = shadow_lookup (shadow, kludge, Qt); | 3319 | tem = shadow_lookup (shadow, kludge, Qt); |
| 3311 | if (!NILP (tem)) | 3320 | if (!NILP (tem)) |
| 3312 | { | 3321 | { |
| 3313 | if (mention_shadow) | 3322 | /* Avoid generating duplicate entries if the |
| 3323 | shadowed binding has the same definition. */ | ||
| 3324 | if (mention_shadow && !EQ (tem, definition)) | ||
| 3314 | this_shadowed = 1; | 3325 | this_shadowed = 1; |
| 3315 | else | 3326 | else |
| 3316 | continue; | 3327 | continue; |