diff options
| author | Karoly Lorentey | 2006-01-03 01:50:46 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-01-03 01:50:46 +0000 |
| commit | b3e6f69c10973ff7b040ced07a3a084960619681 (patch) | |
| tree | 27d84923989971dd576d9d38f111f99c9b2cf2ce /src/lread.c | |
| parent | 0103b7c9f971e43ea4420a3f41704d85ad8f06ee (diff) | |
| download | emacs-b3e6f69c10973ff7b040ced07a3a084960619681.tar.gz emacs-b3e6f69c10973ff7b040ced07a3a084960619681.zip | |
Overhaul and simplify single_kboard API. Allow calls to `recursive-edit' in process filters. Small fixes.
* lisp/server.el (server-process-filter): Protect `display-splash-screen'
call in a condition-case. Explain why.
* src/callint.c (Fcall_interactively): Update call to
`temporarily_switch_to_single_kboard'.
* src/fns.c (Fy_or_n_p): Ditto.
* src/frame.c (Fdelete_frame): Remove unused variable `count'.
* src/keyboard.c (wrong_kboard_jmpbuf): Remove global variable.
* src/keyboard.c (read_char): Add wrong_kboard_jmpbuf parameter to allow
for recursive calls. Update longjmp invocations. Remember the
original current_kboard, and longjmp to `wrong_kboard_jmpbuf' when a
filter, timer or sentinel changes it. Comment out unnecessary calls to
`record_single_kboard_state' and `any_kboard_state'. Update recursive
calls.
* src/keyboard.c (read_key_sequence): Add `wrong_kboard_jmpbuf' local
variable. Update setjmp and read_char calls. Abort if
interrupted_kboard died in read_char.
* src/keyboard.c (any_kboard_state, single_kboard_state)
(record_single_kboard_state): Comment out obsolete functions.
(push_frame_kboard): Remove function.
(pop_kboard): Switch out of single_kboard mode if the
kboard has been deleted.
(temporarily_switch_to_single_kboard): Change first
parameter to a frame pointer. Throw an error when caller wants to
change kboards while in single_kboard mode.
(restore_kboard_configuration): Abort if pop_kboard changed
the kboard in single_kboard mode.
(Frecursive_edit): Switch to single_kboard mode only in
nested command loops.
(cmd_error, command_loop, command_loop_1, timer_check):
Comment out unnecessary call to `any_kboard_state' and
`record_single_kboard_state'.
* src/keyboard.c (delete_kboard): Exit single_kboard mode if we have just
deleted that kboard.
* src/keyboard.c (interrupt_signal): Use `Fkill_emacs' to exit Emacs, not
`fatal_error_signal'.
* src/keyboard.h (read_char, single_kboard_state)
(record_single_kboard_state): Remove.
(temporarily_switch_to_single_kboard): Update.
* src/lread.c: Include setjmp.h. Update declaration of `read_char'.
(read_filtered_event): Call `read_char' with a local
`wrong_kboard_jmpbuf'.
* src/minibuf.c (read_minibuf): Update call to
`temporarily_switch_to_single_kboard'.
* src/termchar.h (tty_display_info): Rename `previous_terminal_frame'
member to `previous_frame'.
* src/xdisp.c (redisplay_internal): Update references to
`previous_terminal_frame'.
(display_mode_line, Fformat_mode_line): Replace calls to
`push_frame_kboard' with `push_kboard'.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-489
Diffstat (limited to 'src/lread.c')
| -rw-r--r-- | src/lread.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lread.c b/src/lread.c index 6555737fa55..236ebebda13 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -27,6 +27,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 27 | #include <sys/stat.h> | 27 | #include <sys/stat.h> |
| 28 | #include <sys/file.h> | 28 | #include <sys/file.h> |
| 29 | #include <errno.h> | 29 | #include <errno.h> |
| 30 | #include <setjmp.h> | ||
| 30 | #include "lisp.h" | 31 | #include "lisp.h" |
| 31 | #include "intervals.h" | 32 | #include "intervals.h" |
| 32 | #include "buffer.h" | 33 | #include "buffer.h" |
| @@ -434,7 +435,7 @@ static void substitute_in_interval P_ ((INTERVAL, Lisp_Object)); | |||
| 434 | 435 | ||
| 435 | /* Get a character from the tty. */ | 436 | /* Get a character from the tty. */ |
| 436 | 437 | ||
| 437 | extern Lisp_Object read_char (); | 438 | extern Lisp_Object read_char P_ ((int, int, Lisp_Object *, Lisp_Object, int *, jmp_buf *)); |
| 438 | 439 | ||
| 439 | /* 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. |
| 440 | 441 | ||
| @@ -459,7 +460,8 @@ read_filtered_event (no_switch_frame, ascii_required, error_nonascii, | |||
| 459 | input_method) | 460 | input_method) |
| 460 | int no_switch_frame, ascii_required, error_nonascii, input_method; | 461 | int no_switch_frame, ascii_required, error_nonascii, input_method; |
| 461 | { | 462 | { |
| 462 | 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)); | ||
| 463 | 465 | ||
| 464 | #ifdef HAVE_WINDOW_SYSTEM | 466 | #ifdef HAVE_WINDOW_SYSTEM |
| 465 | if (display_hourglass_p) | 467 | if (display_hourglass_p) |
| @@ -470,10 +472,12 @@ read_filtered_event (no_switch_frame, ascii_required, error_nonascii, | |||
| 470 | 472 | ||
| 471 | /* Read until we get an acceptable event. */ | 473 | /* Read until we get an acceptable event. */ |
| 472 | retry: | 474 | retry: |
| 475 | setjmp (*wrong_kboard_jmpbuf); | ||
| 476 | |||
| 473 | val = read_char (0, 0, 0, | 477 | val = read_char (0, 0, 0, |
| 474 | (input_method ? Qnil : Qt), | 478 | (input_method ? Qnil : Qt), |
| 475 | 0); | 479 | 0, wrong_kboard_jmpbuf); |
| 476 | 480 | ||
| 477 | if (BUFFERP (val)) | 481 | if (BUFFERP (val)) |
| 478 | goto retry; | 482 | goto retry; |
| 479 | 483 | ||