Mercurial > emacs
comparison src/keyboard.c @ 14079:2464cc0b5b3e
(Fevent_convert_list, Fcommand_execute): Harmonize arguments with
documentation.
author | Erik Naggum <erik@naggum.no> |
---|---|
date | Tue, 09 Jan 1996 00:32:53 +0000 |
parents | 621a575db6f7 |
children | ee40177f6c68 |
comparison
equal
deleted
inserted
replaced
14078:a46002ac278b | 14079:2464cc0b5b3e |
---|---|
4080 /* Convert a list that represents an event type, | 4080 /* Convert a list that represents an event type, |
4081 such as (ctrl meta backspace), into the usual representation of that | 4081 such as (ctrl meta backspace), into the usual representation of that |
4082 event type as a number or a symbol. */ | 4082 event type as a number or a symbol. */ |
4083 | 4083 |
4084 DEFUN ("event-convert-list", Fevent_convert_list, Sevent_convert_list, 1, 1, 0, | 4084 DEFUN ("event-convert-list", Fevent_convert_list, Sevent_convert_list, 1, 1, 0, |
4085 "Convert the event description LIST to an event type.\n\ | 4085 "Convert the event description list EVENT-DESC to an event type.\n\ |
4086 LIST should contain one base event type (a character or symbol)\n\ | 4086 EVENT-DESC should contain one base event type (a character or symbol)\n\ |
4087 and zero or more modifier names (control, meta, hyper, super, shift, alt,\n\ | 4087 and zero or more modifier names (control, meta, hyper, super, shift, alt,\n\ |
4088 drag, down, double or triple).\n\ | 4088 drag, down, double or triple).\n\ |
4089 The return value is an event type (a character or symbol) which\n\ | 4089 The return value is an event type (a character or symbol) which\n\ |
4090 has the same base event type and all the specified modifiers.") | 4090 has the same base event type and all the specified modifiers.") |
4091 (event) | 4091 (event_desc) |
4092 Lisp_Object event; | 4092 Lisp_Object event_desc; |
4093 { | 4093 { |
4094 Lisp_Object base; | 4094 Lisp_Object base; |
4095 int modifiers = 0; | 4095 int modifiers = 0; |
4096 Lisp_Object rest; | 4096 Lisp_Object rest; |
4097 | 4097 |
4098 base = Qnil; | 4098 base = Qnil; |
4099 rest = event; | 4099 rest = event_desc; |
4100 while (CONSP (rest)) | 4100 while (CONSP (rest)) |
4101 { | 4101 { |
4102 Lisp_Object elt; | 4102 Lisp_Object elt; |
4103 int this = 0; | 4103 int this = 0; |
4104 | 4104 |
6373 Optional second arg RECORD-FLAG non-nil\n\ | 6373 Optional second arg RECORD-FLAG non-nil\n\ |
6374 means unconditionally put this command in `command-history'.\n\ | 6374 means unconditionally put this command in `command-history'.\n\ |
6375 Otherwise, that is done only if an arg is read using the minibuffer.\n\ | 6375 Otherwise, that is done only if an arg is read using the minibuffer.\n\ |
6376 The argument KEYS specifies the value to use instead of (this-command-keys)\n\ | 6376 The argument KEYS specifies the value to use instead of (this-command-keys)\n\ |
6377 when reading the arguments; if it is nil, (this_command_key_count) is used.") | 6377 when reading the arguments; if it is nil, (this_command_key_count) is used.") |
6378 (cmd, record, keys) | 6378 (cmd, record_flag, keys) |
6379 Lisp_Object cmd, record, keys; | 6379 Lisp_Object cmd, record_flag, keys; |
6380 { | 6380 { |
6381 register Lisp_Object final; | 6381 register Lisp_Object final; |
6382 register Lisp_Object tem; | 6382 register Lisp_Object tem; |
6383 Lisp_Object prefixarg; | 6383 Lisp_Object prefixarg; |
6384 struct backtrace backtrace; | 6384 struct backtrace backtrace; |
6413 if (STRINGP (final) || VECTORP (final)) | 6413 if (STRINGP (final) || VECTORP (final)) |
6414 { | 6414 { |
6415 /* If requested, place the macro in the command history. For | 6415 /* If requested, place the macro in the command history. For |
6416 other sorts of commands, call-interactively takes care of | 6416 other sorts of commands, call-interactively takes care of |
6417 this. */ | 6417 this. */ |
6418 if (!NILP (record)) | 6418 if (!NILP (record_flag)) |
6419 Vcommand_history | 6419 Vcommand_history |
6420 = Fcons (Fcons (Qexecute_kbd_macro, | 6420 = Fcons (Fcons (Qexecute_kbd_macro, |
6421 Fcons (final, Fcons (prefixarg, Qnil))), | 6421 Fcons (final, Fcons (prefixarg, Qnil))), |
6422 Vcommand_history); | 6422 Vcommand_history); |
6423 | 6423 |
6430 backtrace.function = &Qcall_interactively; | 6430 backtrace.function = &Qcall_interactively; |
6431 backtrace.args = &cmd; | 6431 backtrace.args = &cmd; |
6432 backtrace.nargs = 1; | 6432 backtrace.nargs = 1; |
6433 backtrace.evalargs = 0; | 6433 backtrace.evalargs = 0; |
6434 | 6434 |
6435 tem = Fcall_interactively (cmd, record, keys); | 6435 tem = Fcall_interactively (cmd, record_flag, keys); |
6436 | 6436 |
6437 backtrace_list = backtrace.next; | 6437 backtrace_list = backtrace.next; |
6438 return tem; | 6438 return tem; |
6439 } | 6439 } |
6440 return Qnil; | 6440 return Qnil; |