aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorStefan Monnier2012-09-12 15:16:36 -0400
committerStefan Monnier2012-09-12 15:16:36 -0400
commitbfeae2cf098dcf5bdb4af14d896e790cbe91d60f (patch)
treedb59532750052577bf07f28ee4304dee4a6e9ff5 /src/keyboard.c
parent8099e36b7edde645bfc1a13bfa142ae7645e6bd6 (diff)
downloademacs-bfeae2cf098dcf5bdb4af14d896e790cbe91d60f.tar.gz
emacs-bfeae2cf098dcf5bdb4af14d896e790cbe91d60f.zip
Remove unread-command-char.
* src/keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p) (Fdiscard_input, quit_throw_to_read_char, init_keyboard) (syms_of_keyboard): Remove support for unread-command-char. * lisp/emacs-lisp/debug.el (debugger-outer-unread-command-char, debug) (debugger-env-macro): Remove support for unread-command-char. * lisp/ehelp.el (with-electric-help): Accept functions in electric-help-form-to-execute. (electric-help-execute-extended, electric-help-ctrl-x-prefix): Use it. And replace unread-command-char -> unread-command-events. * lisp/subr.el (set-temporary-overlay-map): Minimize slightly the impact of the temporary map re-appearing on emulation-mode-map-alists. * lisp/emacs-lisp/edebug.el (def-edebug-form-spec): Remove, it's been broken since 22.1.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 8091258578c..7be3e9e118e 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -2366,15 +2366,6 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
2366 goto reread_first; 2366 goto reread_first;
2367 } 2367 }
2368 2368
2369 if (unread_command_char != -1)
2370 {
2371 XSETINT (c, unread_command_char);
2372 unread_command_char = -1;
2373
2374 reread = 1;
2375 goto reread_first;
2376 }
2377
2378 if (CONSP (Vunread_command_events)) 2369 if (CONSP (Vunread_command_events))
2379 { 2370 {
2380 int was_disabled = 0; 2371 int was_disabled = 0;
@@ -2559,7 +2550,6 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
2559 && !NILP (prev_event) && ! EVENT_HAS_PARAMETERS (prev_event) 2550 && !NILP (prev_event) && ! EVENT_HAS_PARAMETERS (prev_event)
2560 /* Don't bring up a menu if we already have another event. */ 2551 /* Don't bring up a menu if we already have another event. */
2561 && NILP (Vunread_command_events) 2552 && NILP (Vunread_command_events)
2562 && unread_command_char < 0
2563 && !detect_input_pending_run_timers (0)) 2553 && !detect_input_pending_run_timers (0))
2564 { 2554 {
2565 c = read_char_minibuf_menu_prompt (commandflag, nmaps, maps); 2555 c = read_char_minibuf_menu_prompt (commandflag, nmaps, maps);
@@ -2695,8 +2685,7 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
2695 && !EQ (XCAR (prev_event), Qmenu_bar) 2685 && !EQ (XCAR (prev_event), Qmenu_bar)
2696 && !EQ (XCAR (prev_event), Qtool_bar) 2686 && !EQ (XCAR (prev_event), Qtool_bar)
2697 /* Don't bring up a menu if we already have another event. */ 2687 /* Don't bring up a menu if we already have another event. */
2698 && NILP (Vunread_command_events) 2688 && NILP (Vunread_command_events))
2699 && unread_command_char < 0)
2700 { 2689 {
2701 c = read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu); 2690 c = read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu);
2702 2691
@@ -10453,7 +10442,7 @@ clear_input_pending (void)
10453int 10442int
10454requeued_events_pending_p (void) 10443requeued_events_pending_p (void)
10455{ 10444{
10456 return (!NILP (Vunread_command_events) || unread_command_char != -1); 10445 return (!NILP (Vunread_command_events));
10457} 10446}
10458 10447
10459 10448
@@ -10463,7 +10452,7 @@ Actually, the value is nil only if we can be sure that no input is available;
10463if there is a doubt, the value is t. */) 10452if there is a doubt, the value is t. */)
10464 (void) 10453 (void)
10465{ 10454{
10466 if (!NILP (Vunread_command_events) || unread_command_char != -1 10455 if (!NILP (Vunread_command_events)
10467 || !NILP (Vunread_post_input_method_events) 10456 || !NILP (Vunread_post_input_method_events)
10468 || !NILP (Vunread_input_method_events)) 10457 || !NILP (Vunread_input_method_events))
10469 return (Qt); 10458 return (Qt);
@@ -10651,7 +10640,6 @@ Also end any kbd macro being defined. */)
10651 update_mode_lines++; 10640 update_mode_lines++;
10652 10641
10653 Vunread_command_events = Qnil; 10642 Vunread_command_events = Qnil;
10654 unread_command_char = -1;
10655 10643
10656 discard_tty_input (); 10644 discard_tty_input ();
10657 10645
@@ -10991,7 +10979,6 @@ quit_throw_to_read_char (int from_signal)
10991 input_pending = 0; 10979 input_pending = 0;
10992 10980
10993 Vunread_command_events = Qnil; 10981 Vunread_command_events = Qnil;
10994 unread_command_char = -1;
10995 10982
10996#if 0 /* Currently, sit_for is called from read_char without turning 10983#if 0 /* Currently, sit_for is called from read_char without turning
10997 off polling. And that can call set_waiting_for_input. 10984 off polling. And that can call set_waiting_for_input.
@@ -11378,12 +11365,11 @@ delete_kboard (KBOARD *kb)
11378void 11365void
11379init_keyboard (void) 11366init_keyboard (void)
11380{ 11367{
11381 /* This is correct before outermost invocation of the editor loop */ 11368 /* This is correct before outermost invocation of the editor loop. */
11382 command_loop_level = -1; 11369 command_loop_level = -1;
11383 immediate_quit = 0; 11370 immediate_quit = 0;
11384 quit_char = Ctl ('g'); 11371 quit_char = Ctl ('g');
11385 Vunread_command_events = Qnil; 11372 Vunread_command_events = Qnil;
11386 unread_command_char = -1;
11387 timer_idleness_start_time = invalid_emacs_time (); 11373 timer_idleness_start_time = invalid_emacs_time ();
11388 total_keys = 0; 11374 total_keys = 0;
11389 recent_keys_index = 0; 11375 recent_keys_index = 0;
@@ -11716,9 +11702,6 @@ as they will already have been added once as they were read for the first time.
11716An element of the form (t . EVENT) forces EVENT to be added to that list. */); 11702An element of the form (t . EVENT) forces EVENT to be added to that list. */);
11717 Vunread_command_events = Qnil; 11703 Vunread_command_events = Qnil;
11718 11704
11719 DEFVAR_INT ("unread-command-char", unread_command_char,
11720 doc: /* If not -1, an object to be read as next command input event. */);
11721
11722 DEFVAR_LISP ("unread-post-input-method-events", Vunread_post_input_method_events, 11705 DEFVAR_LISP ("unread-post-input-method-events", Vunread_post_input_method_events,
11723 doc: /* List of events to be processed as input by input methods. 11706 doc: /* List of events to be processed as input by input methods.
11724These events are processed before `unread-command-events' 11707These events are processed before `unread-command-events'