diff options
| author | Kim F. Storm | 2004-12-15 00:06:46 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-12-15 00:06:46 +0000 |
| commit | 2a84c6da58ee6b4519a0b7167d0cc978dc51c4b2 (patch) | |
| tree | 04d069a3ea64e2ea41e877f310a3e35d59e7cb89 /src | |
| parent | b8217ea67a9d935db5f1f5387ae3f05ba16222d9 (diff) | |
| download | emacs-2a84c6da58ee6b4519a0b7167d0cc978dc51c4b2.tar.gz emacs-2a84c6da58ee6b4519a0b7167d0cc978dc51c4b2.zip | |
(Vthrow_on_input): New variable.
(syms_of_keyboard): Defvar and initialize it.
(kbd_buffer_store_event_hold): Handle Vthrow_on_input.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/keyboard.c | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f377cad5e74..84955d3b0ff 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-12-14 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * keyboard.c (read_char): Save and restore echo_string when | ||
| 4 | handling input method. | ||
| 5 | |||
| 1 | 2004-12-13 Richard M. Stallman <rms@gnu.org> | 6 | 2004-12-13 Richard M. Stallman <rms@gnu.org> |
| 2 | 7 | ||
| 3 | * eval.c (syms_of_eval) <quit-flag>: Doc fix. | 8 | * eval.c (syms_of_eval) <quit-flag>: Doc fix. |
diff --git a/src/keyboard.c b/src/keyboard.c index 4203619863b..b1f8a55507d 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -3580,6 +3580,9 @@ event_to_kboard (event) | |||
| 3580 | } | 3580 | } |
| 3581 | #endif | 3581 | #endif |
| 3582 | 3582 | ||
| 3583 | |||
| 3584 | Lisp_Object Vthrow_on_input; | ||
| 3585 | |||
| 3583 | /* Store an event obtained at interrupt level into kbd_buffer, fifo */ | 3586 | /* Store an event obtained at interrupt level into kbd_buffer, fifo */ |
| 3584 | 3587 | ||
| 3585 | void | 3588 | void |
| @@ -3705,6 +3708,14 @@ kbd_buffer_store_event_hold (event, hold_quit) | |||
| 3705 | *kbd_store_ptr = *event; | 3708 | *kbd_store_ptr = *event; |
| 3706 | ++kbd_store_ptr; | 3709 | ++kbd_store_ptr; |
| 3707 | } | 3710 | } |
| 3711 | |||
| 3712 | /* If we're in a section that requested to be interrupted as soon | ||
| 3713 | as input comes, then set quit-flag to cause an interrupt. */ | ||
| 3714 | if (!NILP (Vthrow_on_input) | ||
| 3715 | && event->kind != FOCUS_IN_EVENT | ||
| 3716 | && event->kind != HELP_EVENT | ||
| 3717 | && event->kind != DEICONIFY_EVENT) | ||
| 3718 | Vquit_flag = Vthrow_on_input; | ||
| 3708 | } | 3719 | } |
| 3709 | 3720 | ||
| 3710 | 3721 | ||
| @@ -11377,6 +11388,12 @@ Used during Emacs' startup. */); | |||
| 11377 | doc: /* *How long to display an echo-area message when the minibuffer is active. | 11388 | doc: /* *How long to display an echo-area message when the minibuffer is active. |
| 11378 | If the value is not a number, such messages don't time out. */); | 11389 | If the value is not a number, such messages don't time out. */); |
| 11379 | Vminibuffer_message_timeout = make_number (2); | 11390 | Vminibuffer_message_timeout = make_number (2); |
| 11391 | |||
| 11392 | DEFVAR_LISP ("throw-on-input", &Vthrow_on_input, | ||
| 11393 | doc: /* If non-nil, any keyboard input throws to this symbol. | ||
| 11394 | The value of that variable is passed to `quit-flag' and later causes a | ||
| 11395 | peculiar kind of quitting. */); | ||
| 11396 | Vthrow_on_input = Qnil; | ||
| 11380 | } | 11397 | } |
| 11381 | 11398 | ||
| 11382 | void | 11399 | void |