Mercurial > emacs
comparison src/keyboard.c @ 7225:420c92074bd6
(record_asynch_buffer_change): Block SIGIO.
(force_auto_save_soon): Call record_asynch_buffer_change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 30 Apr 1994 07:51:48 +0000 |
parents | a96533ce8122 |
children | 7f6b5e9ba2c7 |
comparison
equal
deleted
inserted
replaced
7224:a96533ce8122 | 7225:420c92074bd6 |
---|---|
672 /* Make an auto save happen as soon as possible at command level. */ | 672 /* Make an auto save happen as soon as possible at command level. */ |
673 | 673 |
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, "", |
680 "Invoke the editor command loop recursively.\n\ | 682 "Invoke the editor command loop recursively.\n\ |
681 To get out of the recursive edit, a command can do `(throw 'exit nil)';\n\ | 683 To get out of the recursive edit, a command can do `(throw 'exit nil)';\n\ |
3286 #endif | 3288 #endif |
3287 read_avail_input (expected); | 3289 read_avail_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 |
3300 | 3321 |
3301 /* Read any terminal input already buffered up by the system | 3322 /* Read any terminal input already buffered up by the system |