aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
authorKaroly Lorentey2006-05-10 15:04:01 +0000
committerKaroly Lorentey2006-05-10 15:04:01 +0000
commit8dadeb1e1f78c7be07db5ae78aa9eed58d272a4e (patch)
tree6262988e87d6b347a8c90fcc3c5b49f9bb5b36e1 /src/keymap.c
parentf6cf85ac95e469835a2643024f995b471a4c5d52 (diff)
parent9a4d87c8d5f4503d67d5155eae6d543cc31f86d0 (diff)
downloademacs-8dadeb1e1f78c7be07db5ae78aa9eed58d272a4e.tar.gz
emacs-8dadeb1e1f78c7be07db5ae78aa9eed58d272a4e.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-266 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-267 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-268 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-269 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-270 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-271 Rename "field-at-point" to "field-at-pos" * emacs@sv.gnu.org/emacs--devo--0--patch-272 (comint-insert-input): Remove redundant calls to setq and goto-char git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-556
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/keymap.c b/src/keymap.c
index c609ed6c4e4..31b9378d3ad 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2083,12 +2083,21 @@ push_key_description (c, p, force_multibyte)
2083 int force_multibyte; 2083 int force_multibyte;
2084{ 2084{
2085 unsigned c2; 2085 unsigned c2;
2086 int valid_p;
2086 2087
2087 /* Clear all the meaningless bits above the meta bit. */ 2088 /* Clear all the meaningless bits above the meta bit. */
2088 c &= meta_modifier | ~ - meta_modifier; 2089 c &= meta_modifier | ~ - meta_modifier;
2089 c2 = c & ~(alt_modifier | ctrl_modifier | hyper_modifier 2090 c2 = c & ~(alt_modifier | ctrl_modifier | hyper_modifier
2090 | meta_modifier | shift_modifier | super_modifier); 2091 | meta_modifier | shift_modifier | super_modifier);
2091 2092
2093 valid_p = SINGLE_BYTE_CHAR_P (c2) || char_valid_p (c2, 0);
2094 if (! valid_p)
2095 {
2096 /* KEY_DESCRIPTION_SIZE is large enough for this. */
2097 p += sprintf (p, "[%d]", c);
2098 return p;
2099 }
2100
2092 if (c & alt_modifier) 2101 if (c & alt_modifier)
2093 { 2102 {
2094 *p++ = 'A'; 2103 *p++ = 'A';
@@ -2176,16 +2185,13 @@ push_key_description (c, p, force_multibyte)
2176 } 2185 }
2177 else 2186 else
2178 { 2187 {
2179 int valid_p = SINGLE_BYTE_CHAR_P (c) || char_valid_p (c, 0); 2188 if (force_multibyte)
2180
2181 if (force_multibyte && valid_p)
2182 { 2189 {
2183 if (SINGLE_BYTE_CHAR_P (c)) 2190 if (SINGLE_BYTE_CHAR_P (c))
2184 c = unibyte_char_to_multibyte (c); 2191 c = unibyte_char_to_multibyte (c);
2185 p += CHAR_STRING (c, p); 2192 p += CHAR_STRING (c, p);
2186 } 2193 }
2187 else if (NILP (current_buffer->enable_multibyte_characters) 2194 else if (NILP (current_buffer->enable_multibyte_characters))
2188 || valid_p)
2189 { 2195 {
2190 int bit_offset; 2196 int bit_offset;
2191 *p++ = '\\'; 2197 *p++ = '\\';