Mercurial > hg > xemacs-beta
comparison src/callint.c @ 20:859a2309aef8 r19-15b93
Import from CVS: tag r19-15b93
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:50:05 +0200 |
parents | 9ee227acff29 |
children | 56c54cf7c5b6 |
comparison
equal
deleted
inserted
replaced
19:ac1f612d5250 | 20:859a2309aef8 |
---|---|
73 Lisp_Object Qread_number; | 73 Lisp_Object Qread_number; |
74 Lisp_Object Qread_string; | 74 Lisp_Object Qread_string; |
75 Lisp_Object Qevents_to_keys; | 75 Lisp_Object Qevents_to_keys; |
76 | 76 |
77 /* ARGSUSED */ | 77 /* ARGSUSED */ |
78 DEFUN ("interactive", Finteractive, Sinteractive, 0, UNEVALLED, 0 /* | 78 DEFUN ("interactive", Finteractive, 0, UNEVALLED, 0, /* |
79 Specify a way of parsing arguments for interactive use of a function. | 79 Specify a way of parsing arguments for interactive use of a function. |
80 For example, write | 80 For example, write |
81 (defun foo (arg) \"Doc string\" (interactive \"p\") ...use arg...) | 81 (defun foo (arg) \"Doc string\" (interactive \"p\") ...use arg...) |
82 to make ARG be the prefix argument when `foo' is called as a command. | 82 to make ARG be the prefix argument when `foo' is called as a command. |
83 The \"call\" to `interactive' is actually a declaration rather than a function; | 83 The \"call\" to `interactive' is actually a declaration rather than a function; |
130 If the string begins with `_', then this command will not cause the region | 130 If the string begins with `_', then this command will not cause the region |
131 to be deactivated when it completes; that is, `zmacs-region-stays' will be | 131 to be deactivated when it completes; that is, `zmacs-region-stays' will be |
132 set to t when the command exits successfully. | 132 set to t when the command exits successfully. |
133 You may use any of `@', `*' and `_' at the beginning of the string; | 133 You may use any of `@', `*' and `_' at the beginning of the string; |
134 they are processed in the order that they appear. | 134 they are processed in the order that they appear. |
135 */ ) | 135 */ |
136 (args) | 136 (args)) |
137 Lisp_Object args; | |
138 { | 137 { |
139 return Qnil; | 138 return Qnil; |
140 } | 139 } |
141 | 140 |
142 /* Quotify EXP: if EXP is constant, return it. | 141 /* Quotify EXP: if EXP is constant, return it. |
195 RETURN_UNGCPRO (emacs_doprnt_string_lisp (0, s, 0, nargs, args)); | 194 RETURN_UNGCPRO (emacs_doprnt_string_lisp (0, s, 0, nargs, args)); |
196 } | 195 } |
197 | 196 |
198 /* `lambda' for RECORD-FLAG is an XEmacs addition. */ | 197 /* `lambda' for RECORD-FLAG is an XEmacs addition. */ |
199 | 198 |
200 DEFUN ("call-interactively", Fcall_interactively, Scall_interactively, | 199 DEFUN ("call-interactively", Fcall_interactively, 1, 3, 0, /* |
201 1, 3, 0 /* | |
202 Call FUNCTION, reading args according to its interactive calling specs. | 200 Call FUNCTION, reading args according to its interactive calling specs. |
203 Return the value FUNCTION returns. | 201 Return the value FUNCTION returns. |
204 The function contains a specification of how to do the argument reading. | 202 The function contains a specification of how to do the argument reading. |
205 In the case of user-defined functions, this is specified by placing a call | 203 In the case of user-defined functions, this is specified by placing a call |
206 to the function `interactive' at the top level of the function body. | 204 to the function `interactive' at the top level of the function body. |
214 command-history. Otherwise, this is done only if an arg is read using | 212 command-history. Otherwise, this is done only if an arg is read using |
215 the minibuffer. | 213 the minibuffer. |
216 | 214 |
217 The argument KEYS specifies the value to use instead of (this-command-keys) | 215 The argument KEYS specifies the value to use instead of (this-command-keys) |
218 when reading the arguments. | 216 when reading the arguments. |
219 */ ) | 217 */ |
220 (function, record_flag, keys) | 218 (function, record_flag, keys)) |
221 Lisp_Object function, record_flag, keys; | |
222 { | 219 { |
223 /* This function can GC */ | 220 /* This function can GC */ |
224 int speccount = specpdl_depth (); | 221 int speccount = specpdl_depth (); |
225 Lisp_Object prefix; | 222 Lisp_Object prefix; |
226 | 223 |
905 zmacs_region_stays = 1; | 902 zmacs_region_stays = 1; |
906 return (unbind_to (speccount, fun)); | 903 return (unbind_to (speccount, fun)); |
907 } | 904 } |
908 } | 905 } |
909 | 906 |
910 DEFUN ("prefix-numeric-value", Fprefix_numeric_value, Sprefix_numeric_value, | 907 DEFUN ("prefix-numeric-value", Fprefix_numeric_value, 1, 1, 0, /* |
911 1, 1, 0 /* | |
912 Return numeric meaning of raw prefix argument ARG. | 908 Return numeric meaning of raw prefix argument ARG. |
913 A raw prefix argument is what you get from `(interactive \"P\")'. | 909 A raw prefix argument is what you get from `(interactive \"P\")'. |
914 Its numeric meaning is what you would get from `(interactive \"p\")'. | 910 Its numeric meaning is what you would get from `(interactive \"p\")'. |
915 */ ) | 911 */ |
916 (raw) | 912 (raw)) |
917 Lisp_Object raw; | |
918 { | 913 { |
919 int val; | 914 int val; |
920 | 915 |
921 if (NILP (raw)) | 916 if (NILP (raw)) |
922 val = 1; | 917 val = 1; |
960 defsymbol (&Qsave_excursion, "save-excursion"); | 955 defsymbol (&Qsave_excursion, "save-excursion"); |
961 #if 0 /* ill-conceived */ | 956 #if 0 /* ill-conceived */ |
962 defsymbol (&Qmouse_leave_buffer_hook, "mouse-leave-buffer-hook"); | 957 defsymbol (&Qmouse_leave_buffer_hook, "mouse-leave-buffer-hook"); |
963 #endif | 958 #endif |
964 | 959 |
965 defsubr (&Sinteractive); | 960 DEFSUBR (Finteractive); |
966 defsubr (&Scall_interactively); | 961 DEFSUBR (Fcall_interactively); |
967 defsubr (&Sprefix_numeric_value); | 962 DEFSUBR (Fprefix_numeric_value); |
968 } | 963 } |
969 | 964 |
970 void | 965 void |
971 vars_of_callint (void) | 966 vars_of_callint (void) |
972 { | 967 { |