summaryrefslogtreecommitdiff
path: root/src/lread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lread.c b/src/lread.c
index 8f82c13be6a..ef76e72f75f 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -27,6 +27,7 @@ Boston, MA 02110-1301, USA. */
#include <sys/stat.h>
#include <sys/file.h>
#include <errno.h>
+#include <setjmp.h>
#include "lisp.h"
#include "intervals.h"
#include "buffer.h"
@@ -34,6 +35,7 @@ Boston, MA 02110-1301, USA. */
#include <epaths.h>
#include "commands.h"
#include "keyboard.h"
+#include "frame.h"
#include "termhooks.h"
#include "coding.h"
@@ -437,8 +439,6 @@ static void substitute_in_interval P_ ((INTERVAL, Lisp_Object));
/* Get a character from the tty. */
-extern Lisp_Object read_char ();
-
/* Read input events until we get one that's acceptable for our purposes.
If NO_SWITCH_FRAME is non-zero, switch-frame events are stashed
@@ -481,7 +481,7 @@ read_filtered_event (no_switch_frame, ascii_required, error_nonascii,
{
EMACS_TIME wait_time;
int sec, usec;
- double duration = extract_float (seconds);
+ double duration = extract_float (seconds);
sec = (int) duration;
usec = (duration - sec) * 1000000;
@@ -490,10 +490,12 @@ read_filtered_event (no_switch_frame, ascii_required, error_nonascii,
EMACS_ADD_TIME (end_time, end_time, wait_time);
}
- /* Read until we get an acceptable event. */
+/* Read until we get an acceptable event. */
retry:
- val = read_char (0, 0, 0, (input_method ? Qnil : Qt), 0,
- NUMBERP (seconds) ? &end_time : NULL);
+ do
+ val = read_char (0, 0, 0, (input_method ? Qnil : Qt), 0,
+ NUMBERP (seconds) ? &end_time : NULL);
+ while (INTEGERP (val) && XINT (val) == -2); /* wrong_kboard_jmpbuf */
if (BUFFERP (val))
goto retry;