diff options
| author | Richard M. Stallman | 1994-04-30 07:51:48 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-04-30 07:51:48 +0000 |
| commit | 241ceaf7a26610efcb7b28947af74518474f2556 (patch) | |
| tree | f8be8e6e75f970c9b3df62dd4d06121d4a5d2968 /src | |
| parent | 5846638c2812ff6934f6a7cc7bf9dc051854515e (diff) | |
| download | emacs-241ceaf7a26610efcb7b28947af74518474f2556.tar.gz emacs-241ceaf7a26610efcb7b28947af74518474f2556.zip | |
(record_asynch_buffer_change): Block SIGIO.
(force_auto_save_soon): Call record_asynch_buffer_change.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index d1cda6c6ffd..1532141c45f 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -674,6 +674,8 @@ record_auto_save () | |||
| 674 | force_auto_save_soon () | 674 | force_auto_save_soon () |
| 675 | { | 675 | { |
| 676 | last_auto_save = - auto_save_interval - 1; | 676 | last_auto_save = - auto_save_interval - 1; |
| 677 | |||
| 678 | record_asynch_buffer_change (); | ||
| 677 | } | 679 | } |
| 678 | 680 | ||
| 679 | DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", | 681 | DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", |
| @@ -3288,12 +3290,31 @@ gobble_input (expected) | |||
| 3288 | #endif | 3290 | #endif |
| 3289 | } | 3291 | } |
| 3290 | 3292 | ||
| 3293 | /* Put a buffer_switch_event in the buffer | ||
| 3294 | so that read_key_sequence will notice the new current buffer. */ | ||
| 3295 | |||
| 3291 | record_asynch_buffer_change () | 3296 | record_asynch_buffer_change () |
| 3292 | { | 3297 | { |
| 3293 | struct input_event event; | 3298 | struct input_event event; |
| 3294 | event.kind = buffer_switch_event; | 3299 | event.kind = buffer_switch_event; |
| 3295 | event.frame_or_window = Qnil; | 3300 | event.frame_or_window = Qnil; |
| 3296 | kbd_buffer_store_event (&event); | 3301 | |
| 3302 | /* Make sure no interrupt happens while storing the event. */ | ||
| 3303 | #ifdef SIGIO | ||
| 3304 | if (interrupt_input) | ||
| 3305 | { | ||
| 3306 | SIGMASKTYPE mask; | ||
| 3307 | mask = sigblockx (SIGIO); | ||
| 3308 | kbd_buffer_store_event (&event); | ||
| 3309 | sigsetmask (mask); | ||
| 3310 | } | ||
| 3311 | else | ||
| 3312 | #endif | ||
| 3313 | { | ||
| 3314 | stop_polling (); | ||
| 3315 | kbd_buffer_store_event (&event); | ||
| 3316 | start_polling (); | ||
| 3317 | } | ||
| 3297 | } | 3318 | } |
| 3298 | 3319 | ||
| 3299 | #ifndef VMS | 3320 | #ifndef VMS |