diff options
| author | Richard M. Stallman | 1997-07-20 17:46:17 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-07-20 17:46:17 +0000 |
| commit | 7c3bc9441e761343fe6239ac0dc754d59a73785b (patch) | |
| tree | 35f5ac3bbe9929bb5172b37a1bf25d5958fc49b7 /src | |
| parent | 8c1a6a84ca839b567d38ffab7ed6803bc8cccac4 (diff) | |
| download | emacs-7c3bc9441e761343fe6239ac0dc754d59a73785b.tar.gz emacs-7c3bc9441e761343fe6239ac0dc754d59a73785b.zip | |
(Fcommand_execute): gcpro c.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 6692ddad152..6c068dfd043 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1698,18 +1698,22 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1698 | Lisp_Object prev_event; | 1698 | Lisp_Object prev_event; |
| 1699 | int *used_mouse_menu; | 1699 | int *used_mouse_menu; |
| 1700 | { | 1700 | { |
| 1701 | register Lisp_Object c; | 1701 | Lisp_Object c; |
| 1702 | int count; | 1702 | int count; |
| 1703 | jmp_buf local_getcjmp; | 1703 | jmp_buf local_getcjmp; |
| 1704 | jmp_buf save_jump; | 1704 | jmp_buf save_jump; |
| 1705 | int key_already_recorded = 0; | 1705 | int key_already_recorded = 0; |
| 1706 | Lisp_Object tem, save; | 1706 | Lisp_Object tem, save; |
| 1707 | Lisp_Object also_record; | 1707 | Lisp_Object also_record; |
| 1708 | struct gcpro gcpro1; | ||
| 1709 | |||
| 1708 | also_record = Qnil; | 1710 | also_record = Qnil; |
| 1709 | 1711 | ||
| 1710 | before_command_key_count = this_command_key_count; | 1712 | before_command_key_count = this_command_key_count; |
| 1711 | before_command_echo_length = echo_length (); | 1713 | before_command_echo_length = echo_length (); |
| 1712 | 1714 | ||
| 1715 | GCPRO1 (c); | ||
| 1716 | |||
| 1713 | retry: | 1717 | retry: |
| 1714 | 1718 | ||
| 1715 | if (CONSP (Vunread_command_events)) | 1719 | if (CONSP (Vunread_command_events)) |
| @@ -1766,7 +1770,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1766 | || executing_macro_index >= XFASTINT (Flength (Vexecuting_macro))) | 1770 | || executing_macro_index >= XFASTINT (Flength (Vexecuting_macro))) |
| 1767 | { | 1771 | { |
| 1768 | XSETINT (c, -1); | 1772 | XSETINT (c, -1); |
| 1769 | return c; | 1773 | RETURN_UNGCPRO (c); |
| 1770 | } | 1774 | } |
| 1771 | 1775 | ||
| 1772 | c = Faref (Vexecuting_macro, make_number (executing_macro_index)); | 1776 | c = Faref (Vexecuting_macro, make_number (executing_macro_index)); |
| @@ -1929,7 +1933,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 1929 | /* Now that we have read an event, Emacs is not idle. */ | 1933 | /* Now that we have read an event, Emacs is not idle. */ |
| 1930 | timer_stop_idle (); | 1934 | timer_stop_idle (); |
| 1931 | 1935 | ||
| 1932 | return c; | 1936 | RETURN_UNGCPRO (c); |
| 1933 | } | 1937 | } |
| 1934 | 1938 | ||
| 1935 | /* Maybe autosave and/or garbage collect due to idleness. */ | 1939 | /* Maybe autosave and/or garbage collect due to idleness. */ |
| @@ -2104,12 +2108,10 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 2104 | non_reread_1: | 2108 | non_reread_1: |
| 2105 | 2109 | ||
| 2106 | /* Buffer switch events are only for internal wakeups | 2110 | /* Buffer switch events are only for internal wakeups |
| 2107 | so don't show them to the user. */ | 2111 | so don't show them to the user. |
| 2108 | if (BUFFERP (c)) | 2112 | Also, don't record a key if we already did. */ |
| 2109 | return c; | 2113 | if (BUFFERP (c) || key_already_recorded) |
| 2110 | 2114 | RETURN_UNGCPRO (c); | |
| 2111 | if (key_already_recorded) | ||
| 2112 | return c; | ||
| 2113 | 2115 | ||
| 2114 | /* Process special events within read_char | 2116 | /* Process special events within read_char |
| 2115 | and loop around to read another event. */ | 2117 | and loop around to read another event. */ |
| @@ -2143,7 +2145,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 2143 | { | 2145 | { |
| 2144 | /* If kbd_buffer_get_event gave us an EOF, return that. */ | 2146 | /* If kbd_buffer_get_event gave us an EOF, return that. */ |
| 2145 | if (XINT (c) == -1) | 2147 | if (XINT (c) == -1) |
| 2146 | return c; | 2148 | RETURN_UNGCPRO (c); |
| 2147 | 2149 | ||
| 2148 | if (STRINGP (Vkeyboard_translate_table) | 2150 | if (STRINGP (Vkeyboard_translate_table) |
| 2149 | && XSTRING (Vkeyboard_translate_table)->size > (unsigned) XFASTINT (c)) | 2151 | && XSTRING (Vkeyboard_translate_table)->size > (unsigned) XFASTINT (c)) |
| @@ -2189,8 +2191,11 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 2189 | if (! NILP (also_record)) | 2191 | if (! NILP (also_record)) |
| 2190 | record_char (also_record); | 2192 | record_char (also_record); |
| 2191 | 2193 | ||
| 2194 | UNGCPRO; | ||
| 2195 | |||
| 2192 | from_macro: | 2196 | from_macro: |
| 2193 | reread_first: | 2197 | reread_first: |
| 2198 | |||
| 2194 | before_command_key_count = this_command_key_count; | 2199 | before_command_key_count = this_command_key_count; |
| 2195 | before_command_echo_length = echo_length (); | 2200 | before_command_echo_length = echo_length (); |
| 2196 | 2201 | ||
| @@ -2247,7 +2252,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 2247 | } | 2252 | } |
| 2248 | } | 2253 | } |
| 2249 | 2254 | ||
| 2250 | return c; | 2255 | RETURN_UNGCPRO (c); |
| 2251 | } | 2256 | } |
| 2252 | 2257 | ||
| 2253 | /* Record a key that came from a mouse menu. | 2258 | /* Record a key that came from a mouse menu. |