diff options
| author | Richard M. Stallman | 1996-02-27 06:01:30 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-02-27 06:01:30 +0000 |
| commit | 158f753256e822da31a125fc21ef9abd88b63362 (patch) | |
| tree | 69914f048662fd09121b1ec92a812185b0fe184b /src | |
| parent | 6cf0ae869df1538819550731584ebb189144d176 (diff) | |
| download | emacs-158f753256e822da31a125fc21ef9abd88b63362.tar.gz emacs-158f753256e822da31a125fc21ef9abd88b63362.zip | |
(Fcommand_execute): New arg SPECIAL. All callers changed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index f30920bd894..06a66327fdf 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1356,7 +1356,7 @@ command_loop_1 () | |||
| 1356 | nonundocount = 0; | 1356 | nonundocount = 0; |
| 1357 | if (NILP (current_kboard->Vprefix_arg)) | 1357 | if (NILP (current_kboard->Vprefix_arg)) |
| 1358 | Fundo_boundary (); | 1358 | Fundo_boundary (); |
| 1359 | Fcommand_execute (this_command, Qnil, Qnil); | 1359 | Fcommand_execute (this_command, Qnil, Qnil, Qnil); |
| 1360 | 1360 | ||
| 1361 | } | 1361 | } |
| 1362 | directly_done: ; | 1362 | directly_done: ; |
| @@ -2058,7 +2058,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 2058 | int was_locked = single_kboard; | 2058 | int was_locked = single_kboard; |
| 2059 | 2059 | ||
| 2060 | last_input_char = c; | 2060 | last_input_char = c; |
| 2061 | Fcommand_execute (tem, Qnil, Fvector (1, &last_input_char)); | 2061 | Fcommand_execute (tem, Qnil, Fvector (1, &last_input_char), Qt); |
| 2062 | 2062 | ||
| 2063 | /* Resume allowing input from any kboard, if that was true before. */ | 2063 | /* Resume allowing input from any kboard, if that was true before. */ |
| 2064 | if (!was_locked) | 2064 | if (!was_locked) |
| @@ -2864,7 +2864,7 @@ swallow_events (do_display) | |||
| 2864 | kbd_fetch_ptr = event + 1; | 2864 | kbd_fetch_ptr = event + 1; |
| 2865 | if (kbd_fetch_ptr == kbd_store_ptr) | 2865 | if (kbd_fetch_ptr == kbd_store_ptr) |
| 2866 | input_pending = 0; | 2866 | input_pending = 0; |
| 2867 | Fcommand_execute (tem, Qnil, Fvector (1, &lisp_event)); | 2867 | Fcommand_execute (tem, Qnil, Fvector (1, &lisp_event), Qt); |
| 2868 | if (do_display) | 2868 | if (do_display) |
| 2869 | redisplay_preserve_echo_area (); | 2869 | redisplay_preserve_echo_area (); |
| 2870 | 2870 | ||
| @@ -3010,7 +3010,7 @@ timer_check (do_it_now) | |||
| 3010 | tem = get_keyelt (access_keymap (tem, Qtimer_event, 0, 0), | 3010 | tem = get_keyelt (access_keymap (tem, Qtimer_event, 0, 0), |
| 3011 | 1); | 3011 | 1); |
| 3012 | event = Fcons (Qtimer_event, Fcons (timer, Qnil)); | 3012 | event = Fcons (Qtimer_event, Fcons (timer, Qnil)); |
| 3013 | Fcommand_execute (tem, Qnil, Fvector (1, &event)); | 3013 | Fcommand_execute (tem, Qnil, Fvector (1, &event), Qt); |
| 3014 | 3014 | ||
| 3015 | /* Resume allowing input from any kboard, if that was true before. */ | 3015 | /* Resume allowing input from any kboard, if that was true before. */ |
| 3016 | if (!was_locked) | 3016 | if (!was_locked) |
| @@ -6633,16 +6633,18 @@ DEFUN ("read-key-sequence", Fread_key_sequence, Sread_key_sequence, 1, 4, 0, | |||
| 6633 | return make_event_array (i, keybuf); | 6633 | return make_event_array (i, keybuf); |
| 6634 | } | 6634 | } |
| 6635 | 6635 | ||
| 6636 | DEFUN ("command-execute", Fcommand_execute, Scommand_execute, 1, 3, 0, | 6636 | DEFUN ("command-execute", Fcommand_execute, Scommand_execute, 1, 4, 0, |
| 6637 | "Execute CMD as an editor command.\n\ | 6637 | "Execute CMD as an editor command.\n\ |
| 6638 | CMD must be a symbol that satisfies the `commandp' predicate.\n\ | 6638 | CMD must be a symbol that satisfies the `commandp' predicate.\n\ |
| 6639 | Optional second arg RECORD-FLAG non-nil\n\ | 6639 | Optional second arg RECORD-FLAG non-nil\n\ |
| 6640 | means unconditionally put this command in `command-history'.\n\ | 6640 | means unconditionally put this command in `command-history'.\n\ |
| 6641 | Otherwise, that is done only if an arg is read using the minibuffer.\n\ | 6641 | Otherwise, that is done only if an arg is read using the minibuffer.\n\ |
| 6642 | The argument KEYS specifies the value to use instead of (this-command-keys)\n\ | 6642 | The argument KEYS specifies the value to use instead of (this-command-keys)\n\ |
| 6643 | when reading the arguments; if it is nil, (this_command_key_count) is used.") | 6643 | when reading the arguments; if it is nil, (this_command_key_count) is used.\n\ |
| 6644 | (cmd, record_flag, keys) | 6644 | The argument SPECIAL, if non-nil, means that this command is executing\n\ |
| 6645 | Lisp_Object cmd, record_flag, keys; | 6645 | a special event, so ignore the prefix argument and don't clear it.") |
| 6646 | (cmd, record_flag, keys, special) | ||
| 6647 | Lisp_Object cmd, record_flag, keys, special; | ||
| 6646 | { | 6648 | { |
| 6647 | register Lisp_Object final; | 6649 | register Lisp_Object final; |
| 6648 | register Lisp_Object tem; | 6650 | register Lisp_Object tem; |
| @@ -6650,11 +6652,17 @@ when reading the arguments; if it is nil, (this_command_key_count) is used.") | |||
| 6650 | struct backtrace backtrace; | 6652 | struct backtrace backtrace; |
| 6651 | extern int debug_on_next_call; | 6653 | extern int debug_on_next_call; |
| 6652 | 6654 | ||
| 6653 | prefixarg = current_kboard->Vprefix_arg; | ||
| 6654 | current_kboard->Vprefix_arg = Qnil; | ||
| 6655 | Vcurrent_prefix_arg = prefixarg; | ||
| 6656 | debug_on_next_call = 0; | 6655 | debug_on_next_call = 0; |
| 6657 | 6656 | ||
| 6657 | if (NILP (special)) | ||
| 6658 | { | ||
| 6659 | prefixarg = current_kboard->Vprefix_arg; | ||
| 6660 | Vcurrent_prefix_arg = prefixarg; | ||
| 6661 | current_kboard->Vprefix_arg = Qnil; | ||
| 6662 | } | ||
| 6663 | else | ||
| 6664 | prefixarg = Qnil; | ||
| 6665 | |||
| 6658 | if (SYMBOLP (cmd)) | 6666 | if (SYMBOLP (cmd)) |
| 6659 | { | 6667 | { |
| 6660 | tem = Fget (cmd, Qdisabled); | 6668 | tem = Fget (cmd, Qdisabled); |
| @@ -6812,7 +6820,7 @@ DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_ | |||
| 6812 | } | 6820 | } |
| 6813 | } | 6821 | } |
| 6814 | 6822 | ||
| 6815 | return Fcommand_execute (function, Qt, Qnil); | 6823 | return Fcommand_execute (function, Qt, Qnil, Qnil); |
| 6816 | } | 6824 | } |
| 6817 | 6825 | ||
| 6818 | /* Find the set of keymaps now active. | 6826 | /* Find the set of keymaps now active. |