Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ccc.nmfecc.gov!BOWMAN%PPC.MFENET From: BOWMAN%PPC.MFENET@ccc.nmfecc.gov Newsgroups: gnu.emacs.bug Subject: emacs bug Message-ID: <891019210423.4b000127@CCC.NMFECC.GOV> Date: 20 Oct 89 04:04:23 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 54 Re: Emacs Ctl-G bug. Hi. As I mentioned in my last message, it seems that vmsfns.c was the wrong place to put in the calls to clear_waiting_for_input and set_waiting_for_input. Instead, the following routine seems to be the correct place to make the change. It is taken from sysdep.c and calls process_command_input, a routine from vmsfns.c. I have initialed my changes. If I also (setq window-system t) in the input-handler then I get proper behaviour of both normal Ctl-g and "emergency escape" signals. The Vinhibit_quit=Qt below also is required for proper handling of emergency escapes. There are no changes required in vmsfns.c afterall. -- John Bowman wait_for_kbd_input () { extern int have_process_input, process_exited; /* If already something, avoid doing system calls. */ if (detect_input_pending ()) { return; } /* Clear a flag, and tell ast routine above to set it. */ SYS$CLREF (input_ef); waiting_for_ast = 1; /* Check for timing error: ast happened while we were doing that. */ if (!detect_input_pending ()) { /* No timing error: wait for flag to be set. */ SYS$WFLOR (input_ef, input_eflist); if (!detect_input_pending ()) /* Check for subprocess input availability */ { int dsp = have_process_input || process_exited; clear_waiting_for_input();/* Otherwise Ctl-G will cause crash. JCB */ Vinhibit_quit=Qt; /* JCB */ if (have_process_input) process_command_input (); if (process_exited) process_exit (); if (dsp) { RedoModes++; DoDsp (1); } set_waiting_for_input(0); /* JCB */ } } waiting_for_ast = 0; }