diff options
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 41 |
1 files changed, 11 insertions, 30 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index fad04920e2e..a595742ace8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -20,9 +20,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 20 | 20 | ||
| 21 | #include <config.h> | 21 | #include <config.h> |
| 22 | 22 | ||
| 23 | #define BLOCKINPUT_INLINE EXTERN_INLINE | ||
| 24 | #define KEYBOARD_INLINE EXTERN_INLINE | ||
| 25 | |||
| 26 | #include "sysstdio.h" | 23 | #include "sysstdio.h" |
| 27 | 24 | ||
| 28 | #include "lisp.h" | 25 | #include "lisp.h" |
| @@ -2624,10 +2621,8 @@ read_char (int commandflag, Lisp_Object map, | |||
| 2624 | 2621 | ||
| 2625 | if (/* There currently is something in the echo area. */ | 2622 | if (/* There currently is something in the echo area. */ |
| 2626 | !NILP (echo_area_buffer[0]) | 2623 | !NILP (echo_area_buffer[0]) |
| 2627 | && (/* And it's either not from echoing. */ | 2624 | && (/* It's an echo from a different kboard. */ |
| 2628 | !EQ (echo_area_buffer[0], echo_message_buffer) | 2625 | echo_kboard != current_kboard |
| 2629 | /* Or it's an echo from a different kboard. */ | ||
| 2630 | || echo_kboard != current_kboard | ||
| 2631 | /* Or we explicitly allow overwriting whatever there is. */ | 2626 | /* Or we explicitly allow overwriting whatever there is. */ |
| 2632 | || ok_to_echo_at_next_pause == NULL)) | 2627 | || ok_to_echo_at_next_pause == NULL)) |
| 2633 | cancel_echoing (); | 2628 | cancel_echoing (); |
| @@ -4389,7 +4384,7 @@ decode_timer (Lisp_Object timer, struct timespec *result) | |||
| 4389 | 4384 | ||
| 4390 | if (! (VECTORP (timer) && ASIZE (timer) == 9)) | 4385 | if (! (VECTORP (timer) && ASIZE (timer) == 9)) |
| 4391 | return 0; | 4386 | return 0; |
| 4392 | vector = XVECTOR (timer)->contents; | 4387 | vector = XVECTOR (timer)->u.contents; |
| 4393 | if (! NILP (vector[0])) | 4388 | if (! NILP (vector[0])) |
| 4394 | return 0; | 4389 | return 0; |
| 4395 | 4390 | ||
| @@ -8046,7 +8041,7 @@ process_tool_bar_item (Lisp_Object key, Lisp_Object def, Lisp_Object data, void | |||
| 8046 | discard any previously made item. */ | 8041 | discard any previously made item. */ |
| 8047 | for (i = 0; i < ntool_bar_items; i += TOOL_BAR_ITEM_NSLOTS) | 8042 | for (i = 0; i < ntool_bar_items; i += TOOL_BAR_ITEM_NSLOTS) |
| 8048 | { | 8043 | { |
| 8049 | Lisp_Object *v = XVECTOR (tool_bar_items_vector)->contents + i; | 8044 | Lisp_Object *v = XVECTOR (tool_bar_items_vector)->u.contents + i; |
| 8050 | 8045 | ||
| 8051 | if (EQ (key, v[TOOL_BAR_ITEM_KEY])) | 8046 | if (EQ (key, v[TOOL_BAR_ITEM_KEY])) |
| 8052 | { | 8047 | { |
| @@ -8370,7 +8365,7 @@ append_tool_bar_item (void) | |||
| 8370 | /* Append entries from tool_bar_item_properties to the end of | 8365 | /* Append entries from tool_bar_item_properties to the end of |
| 8371 | tool_bar_items_vector. */ | 8366 | tool_bar_items_vector. */ |
| 8372 | vcopy (tool_bar_items_vector, ntool_bar_items, | 8367 | vcopy (tool_bar_items_vector, ntool_bar_items, |
| 8373 | XVECTOR (tool_bar_item_properties)->contents, TOOL_BAR_ITEM_NSLOTS); | 8368 | XVECTOR (tool_bar_item_properties)->u.contents, TOOL_BAR_ITEM_NSLOTS); |
| 8374 | ntool_bar_items += TOOL_BAR_ITEM_NSLOTS; | 8369 | ntool_bar_items += TOOL_BAR_ITEM_NSLOTS; |
| 8375 | } | 8370 | } |
| 8376 | 8371 | ||
| @@ -9921,20 +9916,7 @@ detect_input_pending_run_timers (bool do_display) | |||
| 9921 | get_input_pending (READABLE_EVENTS_DO_TIMERS_NOW); | 9916 | get_input_pending (READABLE_EVENTS_DO_TIMERS_NOW); |
| 9922 | 9917 | ||
| 9923 | if (old_timers_run != timers_run && do_display) | 9918 | if (old_timers_run != timers_run && do_display) |
| 9924 | { | 9919 | redisplay_preserve_echo_area (8); |
| 9925 | redisplay_preserve_echo_area (8); | ||
| 9926 | /* The following fixes a bug when using lazy-lock with | ||
| 9927 | lazy-lock-defer-on-the-fly set to t, i.e. when fontifying | ||
| 9928 | from an idle timer function. The symptom of the bug is that | ||
| 9929 | the cursor sometimes doesn't become visible until the next X | ||
| 9930 | event is processed. --gerd. */ | ||
| 9931 | { | ||
| 9932 | Lisp_Object tail, frame; | ||
| 9933 | FOR_EACH_FRAME (tail, frame) | ||
| 9934 | if (FRAME_RIF (XFRAME (frame))) | ||
| 9935 | FRAME_RIF (XFRAME (frame))->flush_display (XFRAME (frame)); | ||
| 9936 | } | ||
| 9937 | } | ||
| 9938 | 9920 | ||
| 9939 | return input_pending; | 9921 | return input_pending; |
| 9940 | } | 9922 | } |
| @@ -9985,7 +9967,7 @@ DEFUN ("recent-keys", Frecent_keys, Srecent_keys, 0, 0, 0, | |||
| 9985 | doc: /* Return vector of last 300 events, not counting those from keyboard macros. */) | 9967 | doc: /* Return vector of last 300 events, not counting those from keyboard macros. */) |
| 9986 | (void) | 9968 | (void) |
| 9987 | { | 9969 | { |
| 9988 | Lisp_Object *keys = XVECTOR (recent_keys)->contents; | 9970 | Lisp_Object *keys = XVECTOR (recent_keys)->u.contents; |
| 9989 | Lisp_Object val; | 9971 | Lisp_Object val; |
| 9990 | 9972 | ||
| 9991 | if (total_keys < NUM_RECENT_KEYS) | 9973 | if (total_keys < NUM_RECENT_KEYS) |
| @@ -10011,7 +9993,7 @@ See also `this-command-keys-vector'. */) | |||
| 10011 | (void) | 9993 | (void) |
| 10012 | { | 9994 | { |
| 10013 | return make_event_array (this_command_key_count, | 9995 | return make_event_array (this_command_key_count, |
| 10014 | XVECTOR (this_command_keys)->contents); | 9996 | XVECTOR (this_command_keys)->u.contents); |
| 10015 | } | 9997 | } |
| 10016 | 9998 | ||
| 10017 | DEFUN ("this-command-keys-vector", Fthis_command_keys_vector, Sthis_command_keys_vector, 0, 0, 0, | 9999 | DEFUN ("this-command-keys-vector", Fthis_command_keys_vector, Sthis_command_keys_vector, 0, 0, 0, |
| @@ -10023,7 +10005,7 @@ See also `this-command-keys'. */) | |||
| 10023 | (void) | 10005 | (void) |
| 10024 | { | 10006 | { |
| 10025 | return Fvector (this_command_key_count, | 10007 | return Fvector (this_command_key_count, |
| 10026 | XVECTOR (this_command_keys)->contents); | 10008 | XVECTOR (this_command_keys)->u.contents); |
| 10027 | } | 10009 | } |
| 10028 | 10010 | ||
| 10029 | DEFUN ("this-single-command-keys", Fthis_single_command_keys, | 10011 | DEFUN ("this-single-command-keys", Fthis_single_command_keys, |
| @@ -10038,7 +10020,7 @@ The value is always a vector. */) | |||
| 10038 | { | 10020 | { |
| 10039 | return Fvector (this_command_key_count | 10021 | return Fvector (this_command_key_count |
| 10040 | - this_single_command_key_start, | 10022 | - this_single_command_key_start, |
| 10041 | (XVECTOR (this_command_keys)->contents | 10023 | (XVECTOR (this_command_keys)->u.contents |
| 10042 | + this_single_command_key_start)); | 10024 | + this_single_command_key_start)); |
| 10043 | } | 10025 | } |
| 10044 | 10026 | ||
| @@ -10052,8 +10034,7 @@ shows the events before all translations (except for input methods). | |||
| 10052 | The value is always a vector. */) | 10034 | The value is always a vector. */) |
| 10053 | (void) | 10035 | (void) |
| 10054 | { | 10036 | { |
| 10055 | return Fvector (raw_keybuf_count, | 10037 | return Fvector (raw_keybuf_count, XVECTOR (raw_keybuf)->u.contents); |
| 10056 | (XVECTOR (raw_keybuf)->contents)); | ||
| 10057 | } | 10038 | } |
| 10058 | 10039 | ||
| 10059 | DEFUN ("reset-this-command-lengths", Freset_this_command_lengths, | 10040 | DEFUN ("reset-this-command-lengths", Freset_this_command_lengths, |