diff options
| author | Chong Yidong | 2012-09-02 11:50:29 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-09-02 11:50:29 +0800 |
| commit | 48c948de78cfa6290ca79ab34b7a4d0cb0edfb69 (patch) | |
| tree | 3e132542893e7d09f66a00fd475b686add53db8b /src/keymap.c | |
| parent | af7dda05cc3be33dd2039a116386a638898ef220 (diff) | |
| download | emacs-48c948de78cfa6290ca79ab34b7a4d0cb0edfb69.tar.gz emacs-48c948de78cfa6290ca79ab34b7a4d0cb0edfb69.zip | |
* keymap.c (push_key_description): Print M-TAB as C-M-i.
Fixes: debbugs:11758
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/keymap.c b/src/keymap.c index 4031091501c..85c384b8180 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2157,7 +2157,7 @@ The `kbd' macro is an approximate inverse of this. */) | |||
| 2157 | char * | 2157 | char * |
| 2158 | push_key_description (EMACS_INT ch, char *p, int force_multibyte) | 2158 | push_key_description (EMACS_INT ch, char *p, int force_multibyte) |
| 2159 | { | 2159 | { |
| 2160 | int c, c2; | 2160 | int c, c2, tab_as_ci; |
| 2161 | 2161 | ||
| 2162 | /* Clear all the meaningless bits above the meta bit. */ | 2162 | /* Clear all the meaningless bits above the meta bit. */ |
| 2163 | c = ch & (meta_modifier | ~ - meta_modifier); | 2163 | c = ch & (meta_modifier | ~ - meta_modifier); |
| @@ -2171,6 +2171,8 @@ push_key_description (EMACS_INT ch, char *p, int force_multibyte) | |||
| 2171 | return p; | 2171 | return p; |
| 2172 | } | 2172 | } |
| 2173 | 2173 | ||
| 2174 | tab_as_ci = (c2 == '\t' && (c & meta_modifier)); | ||
| 2175 | |||
| 2174 | if (c & alt_modifier) | 2176 | if (c & alt_modifier) |
| 2175 | { | 2177 | { |
| 2176 | *p++ = 'A'; | 2178 | *p++ = 'A'; |
| @@ -2178,7 +2180,8 @@ push_key_description (EMACS_INT ch, char *p, int force_multibyte) | |||
| 2178 | c -= alt_modifier; | 2180 | c -= alt_modifier; |
| 2179 | } | 2181 | } |
| 2180 | if ((c & ctrl_modifier) != 0 | 2182 | if ((c & ctrl_modifier) != 0 |
| 2181 | || (c2 < ' ' && c2 != 27 && c2 != '\t' && c2 != Ctl ('M'))) | 2183 | || (c2 < ' ' && c2 != 27 && c2 != '\t' && c2 != Ctl ('M')) |
| 2184 | || tab_as_ci) | ||
| 2182 | { | 2185 | { |
| 2183 | *p++ = 'C'; | 2186 | *p++ = 'C'; |
| 2184 | *p++ = '-'; | 2187 | *p++ = '-'; |
| @@ -2216,6 +2219,10 @@ push_key_description (EMACS_INT ch, char *p, int force_multibyte) | |||
| 2216 | *p++ = 'S'; | 2219 | *p++ = 'S'; |
| 2217 | *p++ = 'C'; | 2220 | *p++ = 'C'; |
| 2218 | } | 2221 | } |
| 2222 | else if (tab_as_ci) | ||
| 2223 | { | ||
| 2224 | *p++ = 'i'; | ||
| 2225 | } | ||
| 2219 | else if (c == '\t') | 2226 | else if (c == '\t') |
| 2220 | { | 2227 | { |
| 2221 | *p++ = 'T'; | 2228 | *p++ = 'T'; |