# HG changeset patch # User Karl Heuer # Date 765784743 0 # Node ID c409eb2645099c3e033ca0360b61edbf3e0f5a66 # Parent b1cde622fa6529fa54ebd2fd1c57f993e6cb9328 (kbd_buffer_get_event): Make buffer_switch_event lispy. (record_asynch_buffer_change): New function. Enqueue the event. diff -r b1cde622fa65 -r c409eb264509 src/keyboard.c --- a/src/keyboard.c Fri Apr 08 05:58:12 1994 +0000 +++ b/src/keyboard.c Fri Apr 08 05:59:03 1994 +0000 @@ -2008,6 +2008,12 @@ kbd_fetch_ptr = event + 1; } #endif + else if (event->kind == buffer_switch_event) + { + /* The value doesn't matter here; only the type is tested. */ + XSET (obj, Lisp_Buffer, current_buffer); + kbd_fetch_ptr = event + 1; + } /* Just discard these, by returning nil. (They shouldn't be found in the buffer, but on some machines it appears they do show up.) */ @@ -3250,6 +3256,14 @@ read_avail_input (expected); #endif } + +record_asynch_buffer_change () +{ + struct input_event event; + event.kind = buffer_switch_event; + event.frame_or_window = Qnil; + kbd_buffer_store_event (&event); +} #ifndef VMS