comparison src/data.c @ 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 721daee0fcd8
children aa5ed11f473b
comparison
equal deleted inserted replaced
4692:dc3c2f298857 4693:80cd90837ac5
997 #endif /* WITH_NUMBER_TYPES */ 997 #endif /* WITH_NUMBER_TYPES */
998 998
999 DEFUN ("=", Feqlsign, 1, MANY, 0, /* 999 DEFUN ("=", Feqlsign, 1, MANY, 0, /*
1000 Return t if all the arguments are numerically equal. 1000 Return t if all the arguments are numerically equal.
1001 The arguments may be numbers, characters or markers. 1001 The arguments may be numbers, characters or markers.
1002
1003 arguments: (FIRST &rest ARGS)
1002 */ 1004 */
1003 (int nargs, Lisp_Object *args)) 1005 (int nargs, Lisp_Object *args))
1004 { 1006 {
1005 ARITHCOMPARE_MANY (==, eql) 1007 ARITHCOMPARE_MANY (==, eql)
1006 } 1008 }
1011 (That is, if there is a second argument, it must be numerically greater than 1013 (That is, if there is a second argument, it must be numerically greater than
1012 the first. If there is a third, it must be numerically greater than the 1014 the first. If there is a third, it must be numerically greater than the
1013 second, and so on.) At least one argument is required. 1015 second, and so on.) At least one argument is required.
1014 1016
1015 The arguments may be numbers, characters or markers. 1017 The arguments may be numbers, characters or markers.
1018
1019 arguments: (FIRST &rest ARGS)
1016 */ 1020 */
1017 (int nargs, Lisp_Object *args)) 1021 (int nargs, Lisp_Object *args))
1018 { 1022 {
1019 ARITHCOMPARE_MANY (<, lt) 1023 ARITHCOMPARE_MANY (<, lt)
1020 } 1024 }
1025 (That is, if there is a second argument, it must be numerically less than 1029 (That is, if there is a second argument, it must be numerically less than
1026 the first. If there is a third, it must be numerically less than the 1030 the first. If there is a third, it must be numerically less than the
1027 second, and so forth.) At least one argument is required. 1031 second, and so forth.) At least one argument is required.
1028 1032
1029 The arguments may be numbers, characters or markers. 1033 The arguments may be numbers, characters or markers.
1034
1035 arguments: (FIRST &rest ARGS)
1030 */ 1036 */
1031 (int nargs, Lisp_Object *args)) 1037 (int nargs, Lisp_Object *args))
1032 { 1038 {
1033 ARITHCOMPARE_MANY (>, gt) 1039 ARITHCOMPARE_MANY (>, gt)
1034 } 1040 }
1035 1041
1036 DEFUN ("<=", Fleq, 1, MANY, 0, /* 1042 DEFUN ("<=", Fleq, 1, MANY, 0, /*
1037 Return t if the sequence of arguments is monotonically nondecreasing. 1043 Return t if the sequence of arguments is monotonically nondecreasing.
1038 The arguments may be numbers, characters or markers. 1044 The arguments may be numbers, characters or markers.
1045
1046 arguments: (FIRST &rest ARGS)
1039 */ 1047 */
1040 (int nargs, Lisp_Object *args)) 1048 (int nargs, Lisp_Object *args))
1041 { 1049 {
1042 ARITHCOMPARE_MANY (<=, le) 1050 ARITHCOMPARE_MANY (<=, le)
1043 } 1051 }
1044 1052
1045 DEFUN (">=", Fgeq, 1, MANY, 0, /* 1053 DEFUN (">=", Fgeq, 1, MANY, 0, /*
1046 Return t if the sequence of arguments is monotonically nonincreasing. 1054 Return t if the sequence of arguments is monotonically nonincreasing.
1047 The arguments may be numbers, characters or markers. 1055 The arguments may be numbers, characters or markers.
1056
1057 arguments: (FIRST &rest ARGS)
1048 */ 1058 */
1049 (int nargs, Lisp_Object *args)) 1059 (int nargs, Lisp_Object *args))
1050 { 1060 {
1051 ARITHCOMPARE_MANY (>=, ge) 1061 ARITHCOMPARE_MANY (>=, ge)
1052 } 1062 }
1058 complexity are higher, which means that those algorithms will run SLOWER 1068 complexity are higher, which means that those algorithms will run SLOWER
1059 than this one in the common case. Optimize the common case! */ 1069 than this one in the common case. Optimize the common case! */
1060 DEFUN ("/=", Fneq, 1, MANY, 0, /* 1070 DEFUN ("/=", Fneq, 1, MANY, 0, /*
1061 Return t if no two arguments are numerically equal. 1071 Return t if no two arguments are numerically equal.
1062 The arguments may be numbers, characters or markers. 1072 The arguments may be numbers, characters or markers.
1073
1074 arguments: (FIRST &rest ARGS)
1063 */ 1075 */
1064 (int nargs, Lisp_Object *args)) 1076 (int nargs, Lisp_Object *args))
1065 { 1077 {
1066 #ifdef WITH_NUMBER_TYPES 1078 #ifdef WITH_NUMBER_TYPES
1067 REGISTER int i, j; 1079 REGISTER int i, j;
1438 1450
1439 1451
1440 DEFUN ("+", Fplus, 0, MANY, 0, /* 1452 DEFUN ("+", Fplus, 0, MANY, 0, /*
1441 Return sum of any number of arguments. 1453 Return sum of any number of arguments.
1442 The arguments should all be numbers, characters or markers. 1454 The arguments should all be numbers, characters or markers.
1455
1456 arguments: (&rest ARGS)
1443 */ 1457 */
1444 (int nargs, Lisp_Object *args)) 1458 (int nargs, Lisp_Object *args))
1445 { 1459 {
1446 #ifdef WITH_NUMBER_TYPES 1460 #ifdef WITH_NUMBER_TYPES
1447 REGISTER int i; 1461 REGISTER int i;
1510 1524
1511 DEFUN ("-", Fminus, 1, MANY, 0, /* 1525 DEFUN ("-", Fminus, 1, MANY, 0, /*
1512 Negate number or subtract numbers, characters or markers. 1526 Negate number or subtract numbers, characters or markers.
1513 With one arg, negates it. With more than one arg, 1527 With one arg, negates it. With more than one arg,
1514 subtracts all but the first from the first. 1528 subtracts all but the first from the first.
1529
1530 arguments: (FIRST &rest ARGS)
1515 */ 1531 */
1516 (int nargs, Lisp_Object *args)) 1532 (int nargs, Lisp_Object *args))
1517 { 1533 {
1518 #ifdef WITH_NUMBER_TYPES 1534 #ifdef WITH_NUMBER_TYPES
1519 REGISTER int i; 1535 REGISTER int i;
1632 } 1648 }
1633 1649
1634 DEFUN ("*", Ftimes, 0, MANY, 0, /* 1650 DEFUN ("*", Ftimes, 0, MANY, 0, /*
1635 Return product of any number of arguments. 1651 Return product of any number of arguments.
1636 The arguments should all be numbers, characters or markers. 1652 The arguments should all be numbers, characters or markers.
1653
1654 arguments: (&rest ARGS)
1637 */ 1655 */
1638 (int nargs, Lisp_Object *args)) 1656 (int nargs, Lisp_Object *args))
1639 { 1657 {
1640 #ifdef WITH_NUMBER_TYPES 1658 #ifdef WITH_NUMBER_TYPES
1641 REGISTER int i; 1659 REGISTER int i;
1704 DEFUN ("div", Fdiv, 1, MANY, 0, /* 1722 DEFUN ("div", Fdiv, 1, MANY, 0, /*
1705 Same as `/', but dividing integers creates a ratio instead of truncating. 1723 Same as `/', but dividing integers creates a ratio instead of truncating.
1706 Note that this is a departure from Common Lisp, where / creates ratios when 1724 Note that this is a departure from Common Lisp, where / creates ratios when
1707 dividing integers. Having a separate function lets us avoid breaking existing 1725 dividing integers. Having a separate function lets us avoid breaking existing
1708 Emacs Lisp code that expects / to do integer division. 1726 Emacs Lisp code that expects / to do integer division.
1727
1728 arguments: (FIRST &rest ARGS)
1709 */ 1729 */
1710 (int nargs, Lisp_Object *args)) 1730 (int nargs, Lisp_Object *args))
1711 { 1731 {
1712 REGISTER int i; 1732 REGISTER int i;
1713 Lisp_Object accum, divisor; 1733 Lisp_Object accum, divisor;
1768 return Qnil; /* not (usually) reached */ 1788 return Qnil; /* not (usually) reached */
1769 } 1789 }
1770 #endif /* HAVE_RATIO */ 1790 #endif /* HAVE_RATIO */
1771 1791
1772 DEFUN ("/", Fquo, 1, MANY, 0, /* 1792 DEFUN ("/", Fquo, 1, MANY, 0, /*
1773 Return first argument divided by all the remaining arguments. 1793 Return FIRST divided by all the remaining arguments.
1774 The arguments must be numbers, characters or markers. 1794 The arguments must be numbers, characters or markers.
1775 With one argument, reciprocates the argument. 1795 With one argument, reciprocates the argument.
1796
1797 arguments: (FIRST &rest ARGS)
1776 */ 1798 */
1777 (int nargs, Lisp_Object *args)) 1799 (int nargs, Lisp_Object *args))
1778 { 1800 {
1779 #ifdef WITH_NUMBER_TYPES 1801 #ifdef WITH_NUMBER_TYPES
1780 REGISTER int i; 1802 REGISTER int i;
1890 DEFUN ("max", Fmax, 1, MANY, 0, /* 1912 DEFUN ("max", Fmax, 1, MANY, 0, /*
1891 Return largest of all the arguments. 1913 Return largest of all the arguments.
1892 All arguments must be real numbers, characters or markers. 1914 All arguments must be real numbers, characters or markers.
1893 The value is always a number; markers and characters are converted 1915 The value is always a number; markers and characters are converted
1894 to numbers. 1916 to numbers.
1917
1918 arguments: (FIRST &rest ARGS)
1895 */ 1919 */
1896 (int nargs, Lisp_Object *args)) 1920 (int nargs, Lisp_Object *args))
1897 { 1921 {
1898 #ifdef WITH_NUMBER_TYPES 1922 #ifdef WITH_NUMBER_TYPES
1899 REGISTER int i, maxindex = 0; 1923 REGISTER int i, maxindex = 0;
1985 DEFUN ("min", Fmin, 1, MANY, 0, /* 2009 DEFUN ("min", Fmin, 1, MANY, 0, /*
1986 Return smallest of all the arguments. 2010 Return smallest of all the arguments.
1987 All arguments must be numbers, characters or markers. 2011 All arguments must be numbers, characters or markers.
1988 The value is always a number; markers and characters are converted 2012 The value is always a number; markers and characters are converted
1989 to numbers. 2013 to numbers.
2014
2015 arguments: (FIRST &rest ARGS)
1990 */ 2016 */
1991 (int nargs, Lisp_Object *args)) 2017 (int nargs, Lisp_Object *args))
1992 { 2018 {
1993 #ifdef WITH_NUMBER_TYPES 2019 #ifdef WITH_NUMBER_TYPES
1994 REGISTER int i, minindex = 0; 2020 REGISTER int i, minindex = 0;
2078 } 2104 }
2079 2105
2080 DEFUN ("logand", Flogand, 0, MANY, 0, /* 2106 DEFUN ("logand", Flogand, 0, MANY, 0, /*
2081 Return bitwise-and of all the arguments. 2107 Return bitwise-and of all the arguments.
2082 Arguments may be integers, or markers or characters converted to integers. 2108 Arguments may be integers, or markers or characters converted to integers.
2109
2110 arguments: (&rest ARGS)
2083 */ 2111 */
2084 (int nargs, Lisp_Object *args)) 2112 (int nargs, Lisp_Object *args))
2085 { 2113 {
2086 #ifdef HAVE_BIGNUM 2114 #ifdef HAVE_BIGNUM
2087 REGISTER int i; 2115 REGISTER int i;
2128 } 2156 }
2129 2157
2130 DEFUN ("logior", Flogior, 0, MANY, 0, /* 2158 DEFUN ("logior", Flogior, 0, MANY, 0, /*
2131 Return bitwise-or of all the arguments. 2159 Return bitwise-or of all the arguments.
2132 Arguments may be integers, or markers or characters converted to integers. 2160 Arguments may be integers, or markers or characters converted to integers.
2161
2162 arguments: (&rest ARGS)
2133 */ 2163 */
2134 (int nargs, Lisp_Object *args)) 2164 (int nargs, Lisp_Object *args))
2135 { 2165 {
2136 #ifdef HAVE_BIGNUM 2166 #ifdef HAVE_BIGNUM
2137 REGISTER int i; 2167 REGISTER int i;
2178 } 2208 }
2179 2209
2180 DEFUN ("logxor", Flogxor, 0, MANY, 0, /* 2210 DEFUN ("logxor", Flogxor, 0, MANY, 0, /*
2181 Return bitwise-exclusive-or of all the arguments. 2211 Return bitwise-exclusive-or of all the arguments.
2182 Arguments may be integers, or markers or characters converted to integers. 2212 Arguments may be integers, or markers or characters converted to integers.
2213
2214 arguments: (&rest ARGS)
2183 */ 2215 */
2184 (int nargs, Lisp_Object *args)) 2216 (int nargs, Lisp_Object *args))
2185 { 2217 {
2186 #ifdef HAVE_BIGNUM 2218 #ifdef HAVE_BIGNUM
2187 REGISTER int i; 2219 REGISTER int i;