changeset 4693:80cd90837ac5

Add argument information to remaining MANY or UNEVALLED C subrs. src/ChangeLog addition: 2009-09-20 Aidan Kehoe <kehoea@parhasard.net> * alloc.c (Flist): (Fvector): (Fbit_vector): (Fmake_byte_code): (Fstring): * data.c (Feqlsign): (Flss): (Fgtr): (Fleq): (Fgeq): (Fneq): (Fgtr): (Fplus): (Fminus): (Ftimes): (Fdiv): (Fquo): (Fmax): (Fmin): (Flogand): (Flogior): (Flogxor): * editfns.c (Fsave_excursion): (Fsave_current_buffer): (Fencode_time): (Finsert): (Finsert_before_markers): (Fsave_restriction): (Fformat): * elhash.c (Fmake_hash_table): * eval.c (Fdefun): (Fdefmacro): (Fcatch): (Funwind_protect): (Fcall_with_condition_handler): (Ffuncall): (Fapply): (Frun_hooks): * fns.c (Fappend): (Fconcat): (Fvconcat): (Fbvconcat): (Fnconc): * print.c (Fwith_output_to_temp_buffer): * process.c (Fstart_process_internal): * window.c (Fsave_window_excursion): * widget.c (Fwidget_apply): Add argument information, in a form understood by #'function-arglist, to all these MANY or UNEVALLED (that is to say, special-operator) built-in functions.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 20 Sep 2009 21:29:00 +0100
parents dc3c2f298857
children 2ac296807b88
files src/ChangeLog src/alloc.c src/data.c src/editfns.c src/elhash.c src/emacs.c src/eval.c src/fns.c src/print.c src/process.c src/widget.c src/window.c
diffstat 12 files changed, 160 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Sun Sep 20 17:19:54 2009 +0100
+++ b/src/ChangeLog	Sun Sep 20 21:29:00 2009 +0100
@@ -1,3 +1,56 @@
+2009-09-20  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* alloc.c (Flist): 
+	(Fvector): 
+	(Fbit_vector): 
+	(Fmake_byte_code): 
+	(Fstring): 
+	* data.c (Feqlsign): 
+	(Flss):
+	(Fgtr):
+	(Fleq):
+	(Fgeq):
+	(Fneq):
+	(Fgtr):	
+	(Fplus): 
+	(Fminus): 
+	(Ftimes): 
+	(Fdiv): 
+	(Fquo): 
+	(Fmax): 
+	(Fmin): 
+	(Flogand): 
+	(Flogior): 
+	(Flogxor): 
+	* editfns.c (Fsave_excursion): 
+	(Fsave_current_buffer): 
+	(Fencode_time): 
+	(Finsert): 
+	(Finsert_before_markers): 
+	(Fsave_restriction): 
+	(Fformat): 
+	* elhash.c (Fmake_hash_table): 
+	* eval.c (Fdefun): 
+	(Fdefmacro): 
+	(Fcatch): 
+	(Funwind_protect): 
+	(Fcall_with_condition_handler): 
+	(Ffuncall): 
+	(Fapply): 
+	(Frun_hooks): 
+	* fns.c (Fappend): 
+	(Fconcat): 
+	(Fvconcat): 
+	(Fbvconcat): 
+	(Fnconc): 
+	* print.c (Fwith_output_to_temp_buffer): 
+	* process.c (Fstart_process_internal): 
+	* window.c (Fsave_window_excursion): 
+	* widget.c (Fwidget_apply): 
+	Add argument information, in a form understood by
+	#'function-arglist, to all these MANY or UNEVALLED (that is to
+	say, special-operator) built-in functions.
+
 2009-09-20  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* general-slots.h: 
--- a/src/alloc.c	Sun Sep 20 17:19:54 2009 +0100
+++ b/src/alloc.c	Sun Sep 20 21:29:00 2009 +0100
@@ -1294,8 +1294,10 @@
 }
 
 DEFUN ("list", Flist, 0, MANY, 0, /*
-Return a newly created list with specified arguments as elements.
+Return a newly created list with specified ARGS as elements.
 Any number of arguments, even zero arguments, are allowed.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1617,8 +1619,10 @@
 }
 
 DEFUN ("vector", Fvector, 0, MANY, 0, /*
-Return a newly created vector with specified arguments as elements.
+Return a newly created vector with specified ARGS as elements.
 Any number of arguments, even zero arguments, are allowed.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1798,9 +1802,11 @@
 }
 
 DEFUN ("bit-vector", Fbit_vector, 0, MANY, 0, /*
-Return a newly created bit vector with specified arguments as elements.
+Return a newly created bit vector with specified ARGS as elements.
 Any number of arguments, even zero arguments, are allowed.
 Each argument must be one of the integers 0 or 1.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1855,8 +1861,6 @@
 
 DEFUN ("make-byte-code", Fmake_byte_code, 4, MANY, 0, /*
 Return a new compiled-function object.
-Usage: (arglist instructions constants stack-depth
-	&optional doc-string interactive)
 Note that, unlike all other emacs-lisp functions, calling this with five
 arguments is NOT the same as calling it with six arguments, the last of
 which is nil.  If the INTERACTIVE arg is specified as nil, then that means
@@ -1864,6 +1868,8 @@
 specified, then that means the function is not interactive.
 This is terrible behavior which is retained for compatibility with old
 `.elc' files which expect these semantics.
+
+arguments: (ARGLIST INSTRUCTIONS CONSTANTS STACK-DEPTH &optional DOC-STRING INTERACTIVE)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -2802,6 +2808,8 @@
 
 DEFUN ("string", Fstring, 0, MANY, 0, /*
 Concatenate all the argument characters and make the result a string.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
--- a/src/data.c	Sun Sep 20 17:19:54 2009 +0100
+++ b/src/data.c	Sun Sep 20 21:29:00 2009 +0100
@@ -999,6 +999,8 @@
 DEFUN ("=", Feqlsign, 1, MANY, 0, /*
 Return t if all the arguments are numerically equal.
 The arguments may be numbers, characters or markers.
+
+arguments: (FIRST &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1013,6 +1015,8 @@
 second, and so on.)  At least one argument is required.
 
 The arguments may be numbers, characters or markers.  
+
+arguments: (FIRST &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1027,6 +1031,8 @@
 second, and so forth.)  At least one argument is required.
 
 The arguments may be numbers, characters or markers.
+
+arguments: (FIRST &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1036,6 +1042,8 @@
 DEFUN ("<=", Fleq, 1, MANY, 0, /*
 Return t if the sequence of arguments is monotonically nondecreasing.
 The arguments may be numbers, characters or markers.
+
+arguments: (FIRST &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1045,6 +1053,8 @@
 DEFUN (">=", Fgeq, 1, MANY, 0, /*
 Return t if the sequence of arguments is monotonically nonincreasing.
 The arguments may be numbers, characters or markers.
+
+arguments: (FIRST &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1060,6 +1070,8 @@
 DEFUN ("/=", Fneq, 1, MANY, 0, /*
 Return t if no two arguments are numerically equal.
 The arguments may be numbers, characters or markers.
+
+arguments: (FIRST &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1440,6 +1452,8 @@
 DEFUN ("+", Fplus, 0, MANY, 0, /*
 Return sum of any number of arguments.
 The arguments should all be numbers, characters or markers.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1512,6 +1526,8 @@
 Negate number or subtract numbers, characters or markers.
 With one arg, negates it.  With more than one arg,
 subtracts all but the first from the first.
+
+arguments: (FIRST &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1634,6 +1650,8 @@
 DEFUN ("*", Ftimes, 0, MANY, 0, /*
 Return product of any number of arguments.
 The arguments should all be numbers, characters or markers.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1706,6 +1724,8 @@
 Note that this is a departure from Common Lisp, where / creates ratios when
 dividing integers.  Having a separate function lets us avoid breaking existing
 Emacs Lisp code that expects / to do integer division.
+
+arguments: (FIRST &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1770,9 +1790,11 @@
 #endif /* HAVE_RATIO */
 
 DEFUN ("/", Fquo, 1, MANY, 0, /*
-Return first argument divided by all the remaining arguments.
+Return FIRST divided by all the remaining arguments.
 The arguments must be numbers, characters or markers.
 With one argument, reciprocates the argument.
+
+arguments: (FIRST &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1892,6 +1914,8 @@
 All arguments must be real numbers, characters or markers.
 The value is always a number; markers and characters are converted
 to numbers.
+
+arguments: (FIRST &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1987,6 +2011,8 @@
 All arguments must be numbers, characters or markers.
 The value is always a number; markers and characters are converted
 to numbers.
+
+arguments: (FIRST &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -2080,6 +2106,8 @@
 DEFUN ("logand", Flogand, 0, MANY, 0, /*
 Return bitwise-and of all the arguments.
 Arguments may be integers, or markers or characters converted to integers.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -2130,6 +2158,8 @@
 DEFUN ("logior", Flogior, 0, MANY, 0, /*
 Return bitwise-or of all the arguments.
 Arguments may be integers, or markers or characters converted to integers.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -2180,6 +2210,8 @@
 DEFUN ("logxor", Flogxor, 0, MANY, 0, /*
 Return bitwise-exclusive-or of all the arguments.
 Arguments may be integers, or markers or characters converted to integers.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
--- a/src/editfns.c	Sun Sep 20 17:19:54 2009 +0100
+++ b/src/editfns.c	Sun Sep 20 21:29:00 2009 +0100
@@ -370,6 +370,8 @@
 Executes BODY just like `progn'.
 The values of point, mark and the current buffer are restored
 even in case of abnormal exit (throw or error).
+
+arguments: (&rest BODY)
 */
        (args))
 {
@@ -395,6 +397,8 @@
 DEFUN ("save-current-buffer", Fsave_current_buffer, 0, UNEVALLED, 0, /*
 Save the current buffer; execute BODY; restore the current buffer.
 Executes BODY just like `progn'.
+
+arguments: (&rest BODY)
 */
        (args))
 {
@@ -1139,7 +1143,7 @@
 }
 
 DEFUN ("encode-time", Fencode_time, 6, MANY, 0, /*
-  Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time.
+Convert SECOND, MINUTE, HOUR, DAY, MONTH, YEAR and ZONE to internal time.
 This is the reverse operation of `decode-time', which see.
 ZONE defaults to the current time zone rule.  This can
 be a string (as from `set-time-zone-rule'), or it can be a list
@@ -1155,6 +1159,8 @@
 for example, a DAY of 0 means the day preceding the given month.
 Year numbers less than 100 are treated just like other year numbers.
 If you want them to stand for years in this century, you must do that yourself.
+
+arguments: (SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE &rest REST)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1473,10 +1479,12 @@
    so we don't care if it gets trashed.  */
 
 DEFUN ("insert", Finsert, 0, MANY, 0, /*
-Insert the arguments, either strings or characters, at point.
+Insert ARGS, either strings or characters, at point.
 Point moves forward so that it ends up after the inserted text.
 Any other markers at the point of insertion remain before the text.
 If a string has non-null string-extent-data, new extents will be created.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -1495,6 +1503,8 @@
 Insert strings or characters at point, relocating markers after the text.
 Point moves forward so that it ends up after the inserted text.
 Any other markers at the point of insertion also end up after the text.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -2139,6 +2149,8 @@
 Note: if you are using both `save-excursion' and `save-restriction',
 use `save-excursion' outermost:
     (save-excursion (save-restriction ...))
+
+arguments: (&rest BODY)
 */
        (body))
 {
@@ -2219,6 +2231,8 @@
    %g and %G conversions.
 
 Use %% to put a single % into the output.
+
+arguments: (CONTROL-STRING &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
--- a/src/elhash.c	Sun Sep 20 17:19:54 2009 +0100
+++ b/src/elhash.c	Sun Sep 20 21:29:00 2009 +0100
@@ -956,6 +956,8 @@
 unmarked outside of weak hash tables.  The pair will remain in the
 hash table if the value or key are pointed to by something other than a weak
 hash table, even if the other is not.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
--- a/src/emacs.c	Sun Sep 20 17:19:54 2009 +0100
+++ b/src/emacs.c	Sun Sep 20 21:29:00 2009 +0100
@@ -3006,6 +3006,8 @@
 
 DEFUN_NORETURN ("run-emacs-from-temacs", Frun_emacs_from_temacs, 0, MANY, 0, /*
 Do not call this.  It will reinitialize your XEmacs.  You'll be sorry.
+
+arguments: (&rest ARGS)
 */
 /* If this function is called from startup.el, it will be possible to run
    temacs as an editor using `temacs -batch -l ../lisp/loadup.el
--- a/src/eval.c	Sun Sep 20 17:19:54 2009 +0100
+++ b/src/eval.c	Sun Sep 20 21:29:00 2009 +0100
@@ -1288,9 +1288,11 @@
 }
 
 DEFUN ("defun", Fdefun, 2, UNEVALLED, 0, /*
-\(defun NAME ARGLIST [DOCSTRING] BODY...): define NAME as a function.
+Define NAME as a function.
 The definition is (lambda ARGLIST [DOCSTRING] BODY...).
 See also the function `interactive'.
+
+arguments: (NAME ARGLIST &optional DOCSTRING &rest BODY)
 */
        (args))
 {
@@ -1300,12 +1302,14 @@
 }
 
 DEFUN ("defmacro", Fdefmacro, 2, UNEVALLED, 0, /*
-\(defmacro NAME ARGLIST [DOCSTRING] BODY...): define NAME as a macro.
+Define NAME as a macro.
 The definition is (macro lambda ARGLIST [DOCSTRING] BODY...).
 When the macro is called, as in (NAME ARGS...),
 the function (lambda ARGLIST BODY...) is applied to
 the list ARGS... as it appears in the expression,
 and the result should be a form to be evaluated instead of the original.
+
+arguments: (NAME ARGLIST &optional DOCSTRING &rest BODY)
 */
        (args))
 {
@@ -1536,11 +1540,13 @@
 #endif /* ERROR_CHECK_TRAPPING_PROBLEMS */
 
 DEFUN ("catch", Fcatch, 1, UNEVALLED, 0, /*
-\(catch TAG BODY...): eval BODY allowing nonlocal exits using `throw'.
+Eval BODY allowing nonlocal exits using `throw'.
 TAG is evalled to get the tag to use.  Then the BODY is executed.
 Within BODY, (throw TAG VAL) with same (`eq') tag exits BODY and this `catch'.
 If no throw happens, `catch' returns the value of the last BODY form.
 If a throw happens, it specifies the value to return from `catch'.
+
+arguments: (TAG &rest BODY)
 */
        (args))
 {
@@ -1807,10 +1813,11 @@
 
 DEFUN ("unwind-protect", Funwind_protect, 1, UNEVALLED, 0, /*
 Do BODYFORM, protecting with UNWINDFORMS.
-Usage looks like (unwind-protect BODYFORM UNWINDFORMS...).
 If BODYFORM completes normally, its value is returned
 after executing the UNWINDFORMS.
 If BODYFORM exits nonlocally, the UNWINDFORMS are executed anyway.
+
+arguments: (BODYFORM &rest UNWINDFORMS)
 */
        (args))
 {
@@ -2149,9 +2156,9 @@
 }
 
 DEFUN ("call-with-condition-handler", Fcall_with_condition_handler, 2, MANY, 0, /*
-Regain control when an error is signalled, without popping the stack.
-Usage looks like (call-with-condition-handler HANDLER FUNCTION &rest ARGS).
-This function is similar to `condition-case', but the handler is invoked
+Call FUNCTION with arguments ARGS, regaining control on error.
+
+This function is similar to `condition-case', but HANDLER is invoked
 with the same environment (Lisp stack, bindings, catches, condition-cases)
 that was current when `signal' was called, rather than when the handler
 was established.
@@ -2163,6 +2170,8 @@
 returns, `signal' continues as if the handler were never invoked.
 \(It continues to look for handlers established earlier than this one,
 and invokes the standard error-handler if none is found.)
+
+arguments: (HANDLER FUNCTION &rest ARGS)
 */
        (int nargs, Lisp_Object *args)) /* Note!  Args side-effected! */
 {
@@ -3895,8 +3904,10 @@
 }
 
 DEFUN ("funcall", Ffuncall, 1, MANY, 0, /*
-Call first argument as a function, passing the remaining arguments to it.
+Call FUNCTION as a function, passing the remaining arguments to it.
 Thus, (funcall 'cons 'x 'y) returns (x . y).
+
+arguments: (FUNCTION &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -4222,6 +4233,8 @@
 DEFUN ("apply", Fapply, 2, MANY, 0, /*
 Call FUNCTION with the remaining args, using the last arg as a list of args.
 Thus, (apply '+ 1 2 '(3 4)) returns 10.
+
+arguments: (FUNCTION &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -4965,7 +4978,7 @@
 To make a hook variable buffer-local, use `make-local-hook',
 not `make-local-variable'.
 
-arguments: (&rest HOOKS)
+arguments: (FIRST &rest REST)
 */
        (int nargs, Lisp_Object *args))
 {
--- a/src/fns.c	Sun Sep 20 17:19:54 2009 +0100
+++ b/src/fns.c	Sun Sep 20 21:29:00 2009 +0100
@@ -503,6 +503,8 @@
 Each argument may be a list, vector, bit vector, or string.
 The last argument is not copied, just used as the tail of the new list.
 Also see: `nconc'.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -518,6 +520,8 @@
 as arguments.  Old code that relies on, for example, (concat "foo" 50)
 returning "foo50" will fail.  To fix such code, either apply
 `int-to-string' to the integer argument, or use `format'.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -528,6 +532,8 @@
 Concatenate all the arguments and make the result a vector.
 The result is a vector whose elements are the elements of all the arguments.
 Each argument may be a list, vector, bit vector, or string.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -538,6 +544,8 @@
 Concatenate all the arguments and make the result a bit vector.
 The result is a bit vector whose elements are the elements of all the
 arguments.  Each argument may be a list, vector, bit vector, or string.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
@@ -3064,6 +3072,8 @@
 If the first argument is nil, there is no way to modify it by side
 effect; therefore, write `(setq foo (nconc foo list))' to be sure of
 changing the value of `foo'.
+
+arguments: (&rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
--- a/src/print.c	Sun Sep 20 17:19:54 2009 +0100
+++ b/src/print.c	Sun Sep 20 21:29:00 2009 +0100
@@ -807,6 +807,8 @@
 
 If variable `temp-buffer-show-function' is non-nil, call it at the end
 to get the buffer displayed.  It gets one argument, the buffer to display.
+
+arguments: (BUFNAME &rest BODY)
 */
        (args))
 {
--- a/src/process.c	Sun Sep 20 17:19:54 2009 +0100
+++ b/src/process.c	Sun Sep 20 21:29:00 2009 +0100
@@ -663,6 +663,8 @@
 `set-process-input-coding-system', or `set-process-output-coding-system'.
 
 See also `set-process-filter' and `set-process-stderr-filter'.
+
+arguments: (NAME BUFFER PROGRAM &rest PROGRAM-ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
--- a/src/widget.c	Sun Sep 20 17:19:54 2009 +0100
+++ b/src/widget.c	Sun Sep 20 21:29:00 2009 +0100
@@ -91,6 +91,8 @@
 DEFUN ("widget-apply", Fwidget_apply, 2, MANY, 0, /*
 Apply the value of WIDGET's PROPERTY to the widget itself.
 ARGS are passed as extra arguments to the function.
+
+arguments: (WIDGET PROPERTY &rest ARGS)
 */
        (int nargs, Lisp_Object *args))
 {
--- a/src/window.c	Sun Sep 20 17:19:54 2009 +0100
+++ b/src/window.c	Sun Sep 20 21:29:00 2009 +0100
@@ -5275,10 +5275,12 @@
 }
 
 DEFUN ("save-window-excursion", Fsave_window_excursion, 0, UNEVALLED, 0, /*
-Execute body, preserving window sizes and contents.
+Execute BODY, preserving window sizes and contents.
 Restores which buffer appears in which window, where display starts,
 as well as the current buffer.
 Does not restore the value of point in current buffer.
+
+arguments: (&rest BODY)
 */
        (args))
 {