diff options
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/keymap.c b/src/keymap.c index 21f7dcb5d37..85c384b8180 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1570,9 +1570,7 @@ like in the respective argument of `key-binding'. */) | |||
| 1570 | would not be a problem here, but it is easier to keep | 1570 | would not be a problem here, but it is easier to keep |
| 1571 | things the same. | 1571 | things the same. |
| 1572 | */ | 1572 | */ |
| 1573 | 1573 | record_unwind_current_buffer (); | |
| 1574 | record_unwind_protect (Fset_buffer, Fcurrent_buffer ()); | ||
| 1575 | |||
| 1576 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); | 1574 | set_buffer_internal (XBUFFER (XWINDOW (window)->buffer)); |
| 1577 | } | 1575 | } |
| 1578 | } | 1576 | } |
| @@ -2159,7 +2157,7 @@ The `kbd' macro is an approximate inverse of this. */) | |||
| 2159 | char * | 2157 | char * |
| 2160 | push_key_description (EMACS_INT ch, char *p, int force_multibyte) | 2158 | push_key_description (EMACS_INT ch, char *p, int force_multibyte) |
| 2161 | { | 2159 | { |
| 2162 | int c, c2; | 2160 | int c, c2, tab_as_ci; |
| 2163 | 2161 | ||
| 2164 | /* Clear all the meaningless bits above the meta bit. */ | 2162 | /* Clear all the meaningless bits above the meta bit. */ |
| 2165 | c = ch & (meta_modifier | ~ - meta_modifier); | 2163 | c = ch & (meta_modifier | ~ - meta_modifier); |
| @@ -2173,6 +2171,8 @@ push_key_description (EMACS_INT ch, char *p, int force_multibyte) | |||
| 2173 | return p; | 2171 | return p; |
| 2174 | } | 2172 | } |
| 2175 | 2173 | ||
| 2174 | tab_as_ci = (c2 == '\t' && (c & meta_modifier)); | ||
| 2175 | |||
| 2176 | if (c & alt_modifier) | 2176 | if (c & alt_modifier) |
| 2177 | { | 2177 | { |
| 2178 | *p++ = 'A'; | 2178 | *p++ = 'A'; |
| @@ -2180,7 +2180,8 @@ push_key_description (EMACS_INT ch, char *p, int force_multibyte) | |||
| 2180 | c -= alt_modifier; | 2180 | c -= alt_modifier; |
| 2181 | } | 2181 | } |
| 2182 | if ((c & ctrl_modifier) != 0 | 2182 | if ((c & ctrl_modifier) != 0 |
| 2183 | || (c2 < ' ' && c2 != 27 && c2 != '\t' && c2 != Ctl ('M'))) | 2183 | || (c2 < ' ' && c2 != 27 && c2 != '\t' && c2 != Ctl ('M')) |
| 2184 | || tab_as_ci) | ||
| 2184 | { | 2185 | { |
| 2185 | *p++ = 'C'; | 2186 | *p++ = 'C'; |
| 2186 | *p++ = '-'; | 2187 | *p++ = '-'; |
| @@ -2218,6 +2219,10 @@ push_key_description (EMACS_INT ch, char *p, int force_multibyte) | |||
| 2218 | *p++ = 'S'; | 2219 | *p++ = 'S'; |
| 2219 | *p++ = 'C'; | 2220 | *p++ = 'C'; |
| 2220 | } | 2221 | } |
| 2222 | else if (tab_as_ci) | ||
| 2223 | { | ||
| 2224 | *p++ = 'i'; | ||
| 2225 | } | ||
| 2221 | else if (c == '\t') | 2226 | else if (c == '\t') |
| 2222 | { | 2227 | { |
| 2223 | *p++ = 'T'; | 2228 | *p++ = 'T'; |