Mercurial > emacs
comparison src/keyboard.c @ 13309:499e9df6c0f6
(Fcommand_execute): New arg KEYS. Callers changed.
(read_char): Specify KEYS when handling Vspecial_event_map.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 27 Oct 1995 21:57:33 +0000 |
parents | 4caecb87e4ec |
children | cff657a37032 |
comparison
equal
deleted
inserted
replaced
13308:99457b67e20c | 13309:499e9df6c0f6 |
---|---|
1378 /* Here for a command that isn't executed directly */ | 1378 /* Here for a command that isn't executed directly */ |
1379 | 1379 |
1380 nonundocount = 0; | 1380 nonundocount = 0; |
1381 if (NILP (current_kboard->Vprefix_arg)) | 1381 if (NILP (current_kboard->Vprefix_arg)) |
1382 Fundo_boundary (); | 1382 Fundo_boundary (); |
1383 Fcommand_execute (this_command, Qnil); | 1383 Fcommand_execute (this_command, Qnil, Qnil); |
1384 | 1384 |
1385 } | 1385 } |
1386 directly_done: ; | 1386 directly_done: ; |
1387 | 1387 |
1388 /* Note that the value cell will never directly contain nil | 1388 /* Note that the value cell will never directly contain nil |
2065 Vquit_flag = save; | 2065 Vquit_flag = save; |
2066 | 2066 |
2067 if (!NILP (tem)) | 2067 if (!NILP (tem)) |
2068 { | 2068 { |
2069 last_input_char = c; | 2069 last_input_char = c; |
2070 Fcommand_execute (tem, Qnil); | 2070 Fcommand_execute (tem, Qnil, Fvector (1, &last_input_char)); |
2071 goto retry; | 2071 goto retry; |
2072 } | 2072 } |
2073 | 2073 |
2074 /* Wipe the echo area. */ | 2074 /* Wipe the echo area. */ |
2075 echo_area_glyphs = 0; | 2075 echo_area_glyphs = 0; |
6240 } | 6240 } |
6241 UNGCPRO; | 6241 UNGCPRO; |
6242 return make_event_array (i, keybuf); | 6242 return make_event_array (i, keybuf); |
6243 } | 6243 } |
6244 | 6244 |
6245 DEFUN ("command-execute", Fcommand_execute, Scommand_execute, 1, 2, 0, | 6245 DEFUN ("command-execute", Fcommand_execute, Scommand_execute, 1, 3, 0, |
6246 "Execute CMD as an editor command.\n\ | 6246 "Execute CMD as an editor command.\n\ |
6247 CMD must be a symbol that satisfies the `commandp' predicate.\n\ | 6247 CMD must be a symbol that satisfies the `commandp' predicate.\n\ |
6248 Optional second arg RECORD-FLAG non-nil\n\ | 6248 Optional second arg RECORD-FLAG non-nil\n\ |
6249 means unconditionally put this command in `command-history'.\n\ | 6249 means unconditionally put this command in `command-history'.\n\ |
6250 Otherwise, that is done only if an arg is read using the minibuffer.") | 6250 Otherwise, that is done only if an arg is read using the minibuffer.\n\ |
6251 (cmd, record) | 6251 The argument KEYS specifies the value to use instead of (this-command-keys)\n\ |
6252 Lisp_Object cmd, record; | 6252 when reading the arguments; if it is nil, (this_command_key_count) is used.") |
6253 (cmd, record, keys) | |
6254 Lisp_Object cmd, record, keys; | |
6253 { | 6255 { |
6254 register Lisp_Object final; | 6256 register Lisp_Object final; |
6255 register Lisp_Object tem; | 6257 register Lisp_Object tem; |
6256 Lisp_Object prefixarg; | 6258 Lisp_Object prefixarg; |
6257 struct backtrace backtrace; | 6259 struct backtrace backtrace; |
6303 backtrace.function = &Qcall_interactively; | 6305 backtrace.function = &Qcall_interactively; |
6304 backtrace.args = &cmd; | 6306 backtrace.args = &cmd; |
6305 backtrace.nargs = 1; | 6307 backtrace.nargs = 1; |
6306 backtrace.evalargs = 0; | 6308 backtrace.evalargs = 0; |
6307 | 6309 |
6308 tem = Fcall_interactively (cmd, record); | 6310 tem = Fcall_interactively (cmd, record, keys); |
6309 | 6311 |
6310 backtrace_list = backtrace.next; | 6312 backtrace_list = backtrace.next; |
6311 return tem; | 6313 return tem; |
6312 } | 6314 } |
6313 return Qnil; | 6315 return Qnil; |
6420 ? Vsuggest_key_bindings : make_number (2)), | 6422 ? Vsuggest_key_bindings : make_number (2)), |
6421 Qnil, Qnil); | 6423 Qnil, Qnil); |
6422 } | 6424 } |
6423 } | 6425 } |
6424 | 6426 |
6425 return Fcommand_execute (function, Qt); | 6427 return Fcommand_execute (function, Qt, Qnil); |
6426 } | 6428 } |
6427 | 6429 |
6428 /* Find the set of keymaps now active. | 6430 /* Find the set of keymaps now active. |
6429 Store into *MAPS_P a vector holding the various maps | 6431 Store into *MAPS_P a vector holding the various maps |
6430 and return the number of them. The vector was malloc'd | 6432 and return the number of them. The vector was malloc'd |