Mercurial > emacs
changeset 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 | 6b202e759f69 |
files | src/keyboard.c |
diffstat | 1 files changed, 22 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Sat Apr 30 07:40:40 1994 +0000 +++ b/src/keyboard.c Sat Apr 30 07:51:48 1994 +0000 @@ -674,6 +674,8 @@ force_auto_save_soon () { last_auto_save = - auto_save_interval - 1; + + record_asynch_buffer_change (); } DEFUN ("recursive-edit", Frecursive_edit, Srecursive_edit, 0, 0, "", @@ -3288,12 +3290,31 @@ #endif } +/* Put a buffer_switch_event in the buffer + so that read_key_sequence will notice the new current buffer. */ + record_asynch_buffer_change () { struct input_event event; event.kind = buffer_switch_event; event.frame_or_window = Qnil; - kbd_buffer_store_event (&event); + + /* Make sure no interrupt happens while storing the event. */ +#ifdef SIGIO + if (interrupt_input) + { + SIGMASKTYPE mask; + mask = sigblockx (SIGIO); + kbd_buffer_store_event (&event); + sigsetmask (mask); + } + else +#endif + { + stop_polling (); + kbd_buffer_store_event (&event); + start_polling (); + } } #ifndef VMS