comparison src/lread.c @ 83460:dbd791ef90a1

Eliminate wrong_kboard_jmpbuf. * src/keyboard.c (read_char, read_char_minibuf_menu_prompt) (read_key_sequence, read_filtered_event): Eliminate wrong_kboard_jmpbuf. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-500
author Karoly Lorentey <lorentey@elte.hu>
date Sun, 29 Jan 2006 00:17:11 +0000
parents c69d44922688
children 9b150bc96d33
comparison
equal deleted inserted replaced
83459:8d8bc8469c77 83460:dbd791ef90a1
433 static void substitute_in_interval P_ ((INTERVAL, Lisp_Object)); 433 static void substitute_in_interval P_ ((INTERVAL, Lisp_Object));
434 434
435 435
436 /* Get a character from the tty. */ 436 /* Get a character from the tty. */
437 437
438 extern Lisp_Object read_char P_ ((int, int, Lisp_Object *, Lisp_Object, int *, jmp_buf *)); 438 extern Lisp_Object read_char P_ ((int, int, Lisp_Object *, Lisp_Object, int *));
439 439
440 /* Read input events until we get one that's acceptable for our purposes. 440 /* Read input events until we get one that's acceptable for our purposes.
441 441
442 If NO_SWITCH_FRAME is non-zero, switch-frame events are stashed 442 If NO_SWITCH_FRAME is non-zero, switch-frame events are stashed
443 until we get a character we like, and then stuffed into 443 until we get a character we like, and then stuffed into
459 read_filtered_event (no_switch_frame, ascii_required, error_nonascii, 459 read_filtered_event (no_switch_frame, ascii_required, error_nonascii,
460 input_method) 460 input_method)
461 int no_switch_frame, ascii_required, error_nonascii, input_method; 461 int no_switch_frame, ascii_required, error_nonascii, input_method;
462 { 462 {
463 volatile register Lisp_Object val, delayed_switch_frame; 463 volatile register Lisp_Object val, delayed_switch_frame;
464 jmp_buf *volatile wrong_kboard_jmpbuf = alloca (sizeof (jmp_buf));
465 464
466 #ifdef HAVE_WINDOW_SYSTEM 465 #ifdef HAVE_WINDOW_SYSTEM
467 if (display_hourglass_p) 466 if (display_hourglass_p)
468 cancel_hourglass (); 467 cancel_hourglass ();
469 #endif 468 #endif
470 469
471 delayed_switch_frame = Qnil; 470 delayed_switch_frame = Qnil;
472 471
473 /* Read until we get an acceptable event. */ 472 /* Read until we get an acceptable event. */
474 retry: 473 retry:
475 setjmp (*wrong_kboard_jmpbuf); 474 do
476 475 val = read_char (0, 0, 0, (input_method ? Qnil : Qt), 0);
477 val = read_char (0, 0, 0, 476 while (INTEGERP (val) && XINT (val) == -2); /* wrong_kboard_jmpbuf */
478 (input_method ? Qnil : Qt), 477
479 0, wrong_kboard_jmpbuf);
480
481 if (BUFFERP (val)) 478 if (BUFFERP (val))
482 goto retry; 479 goto retry;
483 480
484 /* switch-frame events are put off until after the next ASCII 481 /* switch-frame events are put off until after the next ASCII
485 character. This is better than signaling an error just because 482 character. This is better than signaling an error just because