Commit 3fb37649 authored by Juergen Nickelsen's avatar Juergen Nickelsen
Browse files

sorted the Builtin init array alphabetically

parent 02e0d986
......@@ -1029,161 +1029,202 @@ sub Btype_of {
my @builtins = # [name, func, is_special, doc]
(
["defvar", \&Bdefvar, 1,
"Define global variable SYMBOL with optional INITVALUE and DOCSTRING"],
["truncate", \&Btruncate, 0,
"return NUMBER truncated to integer towards zero"],
["div", \&Bdiv, 0, "integer divide the first arg by all others"],
["let*", \&Blet_star, 1,
"evaluate body with local bindings: (let* ((var value) ...) body)"],
["let", \&Blet, 1,
"evaluate body with local bindings: (let ((var value) ...) body)"],
["load", \&Bload, 0, "load FILE, optional args NOERROR, NOMESSAGE"],
["debug", \&Bdebug, 0, "set or get debug level"],
["null", \&Bnull, 0, "return t if the argument is nil, nil otherwise"],
["eval", \&Beval, 0, "evaluate Lisp EXPRESSION"],
["apply", \&Bapply, 0, "apply FUNCTION to ARGLIST"],
["funcall", \&Bfuncall, 0, "call FUNCTION with (remaining) arguments"],
["set", \&Bset, 0,
"set SYMBOL's value as a variable to VALUE, return VALUE"],
["setq", \&Bsetq, 1, "set (implicitly quoted) VARIABLE to VALUE"],
["while", \&Bwhile, 1, "while COND is true, eval &rest CLAUSES"],
["load", \&Bload, 0, "load expressions from specified file"],
["<", \&Bnum_less, 0,
"return t if the arguments are strictly increasing, nil else"],
["=", \&Bnum_equal, 0,
"return t all arguments are the same number, nil else"],
["identity", \&Bquote, 0, "return the argument"],
["function", \&Bfunction, 1, "return the argument as a function"],
["quote", \&Bquote, 1, "return the argument without evaluating it"],
["defun", \&Bdefun, 1, "define function with NAME, ARGS, and clauses"],
["car", \&Bcar, 0, "return the car of PAIR"],
["cdr", \&Bcdr, 0, "return the cdr of PAIR"],
["intern", \&Bintern, 0, "return symbol with name STRING"],
["cons", \&Bcons, 0, "return a new pair from elements CAR and CDR"],
["list", \&Blist, 0, "return a new list from the arguments"],
["listp", \&Blistp, 0, "return t if OBJECT is a list, 0, otherwise nil"],
["symbolp", \&Bsymbolp, 0,
"return t if OBJECT is a symbol, otherwise nil"],
["numberp", \&Bnumberp, 0,
"return t if OBJECT is a number, otherwise nil"],
["stringp", \&Bstringp, 0,
"return t if OBJECT is a string, otherwise nil"],
["consp", \&Bconsp, 0, "return t if OBJECT is a pair, otherwise nil"],
["functionp", \&Bfunctionp, 0,
"return t if OBJECT is a function, otherwise nil"],
["symbol-name", \&Bsymbol_name, 0,
"return the name of SYMBOL as a string"],
["symbol-function", \&Bsymbol_function, 0,
"return the value of the function cell of SYMBOL"],
["rplaca", \&Brplaca, 0,
"set the car of PAIR to NEWCAR and return NEWCAR"],
["rplacd", \&Brplacd, 0,
"set the cdr of PAIR to NEWCDR and return NEWCDR"],
["fset", \&Bfset, 0,
"set function cell of SYMBOL to FUNC and return FUNC"],
["if", \&Bif, 1,
"if COND is true, evaluate THEN-CLAUSE, otherwise all other clauses"],
["+", \&Bplus, 0, "return the sum of all argument numbers"],
["-", \&Bminus, 0,
"return NUM1 minus all other numbers, or the negation of sole arg NUM1"],
["%", \&Bmodulo, 0,
"return remainder of NUM1 divided by NUM2 (which must be integers)"],
["*", \&Bproduct, 0, "return the product of all numbers"],
["**", \&Bpower, 0, "return BASE raised to the power POWER"],
["*", \&Bproduct, 0,
"return the product of all numbers"],
["**", \&Bpower, 0,
"return BASE raised to the power POWER"],
["+", \&Bplus, 0,
"return the sum of all argument numbers"],
["-", \&Bminus, 0,
"return NUM1 minus all other numbers, or the negation of sole arg NUM1"],
["/", \&Bdivide, 0,
"return NUM1 divided by all numbers, or the inverse of sole arg NUM1"],
["<", \&Bnum_less, 0,
"return t if the arguments are strictly increasing, nil else"],
["=", \&Bnum_equal, 0,
"return t all arguments are the same number, nil else"],
["and", \&Band, 1,
"evaluate ARGS until one is nil and return the last evaluated value"],
["or", \&Bor, 1,
"evaluate ARGS until one is non-nil and return the last evaluated value"],
["apply", \&Bapply, 0,
"apply FUNCTION to ARGLIST"],
["boundp", \&Bboundp, 0,
"return t if a value is bound to SYMBOL, nil otherwise"],
["car", \&Bcar, 0,
"return the car of PAIR"],
["cdr", \&Bcdr, 0,
"return the cdr of PAIR"],
["concat", \&Bconcat, 0,
"concatenate the arguments to a string"],
["cond", \&Bcond, 1,
"eval car of clauses until one is true, then eval rest of the clause"],
["cons", \&Bcons, 0,
"return a new pair from elements CAR and CDR"],
["consp", \&Bconsp, 0,
"return t if OBJECT is a pair, otherwise nil"],
["debug", \&Bdebug, 0,
"set or get debug level"],
["decf", \&Bdecf, 1,
"decrement number VAR by DELTA (or 1) and return the new value"],
["defun", \&Bdefun, 1,
"define function with NAME, ARGS, and clauses"],
["defvar", \&Bdefvar, 1,
"Define global variable SYMBOL with optional INITVALUE and DOCSTRING"],
["describe", \&Bdescribe, 0,
"return list of OBJECT's type and features"],
["div", \&Bdiv, 0,
"integer divide the first arg by all others"],
["doc", \&Bdoc, 0,
"return the function documentation of ARG"],
["dolist", \&Bdolist, 1,
"iterate over list (dolist (loopvar listform [resultform]) . bodyforms)"],
["dump", \&Bdump, 0,
"return a dump of the internal data structure of the argument"],
["lambda", \&Blambda, 1,
"define an anonymous function from ARGS and &rest BODY"],
["env-ref", \&Benv_ref, 0,
"in ENV, look up SYMBOL, &optional not in NOPARENTS"],
["env-vars", \&Benv_vars, 0,
"show all vars in ENV, &optional not in NOPARENTS"],
["environment", \&Benvironment, 0,
"bindings of ENVIRON (or current) as list of pairs, &optional NOPARENTS"],
["eq", \&Beq, 0,
"return t if ARG1 and ARG2 are the same object, nil else"],
["symbols", \&Bsymbols, 0, "return a list of all symbols"],
["princ", \&Bprinc, 0, "print ARG to standard output without quoting"],
["princs", \&Bprincs, 0, "princ ARG to a string and return the string"],
["prin1", \&Bprin1, 0, "print ARG suitable for read"],
["print", \&Bprint, 0, "print newline, ARG suitable for read, and space"],
["terpri", \&Bterpri, 0, "terminate a print line with a newline char"],
["doc", \&Bdoc, 0, "return the function documentation of ARG"],
["error", \&Berror, 0,
"throw an error with MESSAGE and optional arguments"],
["concat", \&Bconcat, 0, "concatenate the arguments to a string"],
["re-match", \&Bre_match, 0,
"match REGEXP to a string and return the result(s)"],
["string=", \&Bstring_equal, 0,
"return t if all arguments are equal as strings, nil else"],
["string<", \&Bstring_less, 0,
"return t if argument strings are in strictly ascending order, nil else"],
["errset", \&Berrset, 1,
"return value of EXPR as singleton list, or nil in case of error"],
["format", \&Bformat, 0,
"to CHANNEL, use FORMAT to format the remaining aruments"],
["exit", \&Bexit, 0, "exit Lis.pl with STATUS"],
["glob-filenames", \&Bglob_filenames, 0,
"return the list of file names matching PATTERN"],
["boundp", \&Bboundp, 0,
"return t if a value is bound to SYMBOL, nil otherwise"],
["eval", \&Beval, 0,
"evaluate Lisp EXPRESSION"],
["exit", \&Bexit, 0,
"exit Lis.pl with STATUS"],
["fboundp", \&Bfboundp, 0,
"return t if a function is bound to SYMBOL, nil otherwise"],
["makunbound", \&Bmakunbound, 0, "make SYMBOL's value be undefined"],
["fmakunbound", \&Bfmakunbound, 0,
"make SYMBOL's function definition be undefined"],
["type-of", \&Btype_of, 0, "return type of OBJECT as a symbol"],
["describe", \&Bdescribe, 0, "return list of OBJECT's type and features"],
["put", \&Bput, 0, "on OBJECT's plist set property INDICATOR to VALUE"],
["get", \&Bget, 0, "from OBJECT's plist, get value of property INDICATOR"],
["symbol-plist", \&Bsymbol_plist, 0, "return SYMBOL's plist"],
["remprop", \&Bremprop, 0,
"from SYMBOL's plist, remove property INDICATOR"],
["format", \&Bformat, 0,
"to CHANNEL, use FORMAT to format the remaining aruments"],
["fset", \&Bfset, 0,
"set function cell of SYMBOL to FUNC and return FUNC"],
["funcall", \&Bfuncall, 0,
"call FUNCTION with (remaining) arguments"],
["function", \&Bfunction, 1,
"return the argument as a function"],
["function-environment", \&Bfunction_environment, 0,
"return the environment of the specified FUNCTION"],
["functionp", \&Bfunctionp, 0,
"return t if OBJECT is a function, otherwise nil"],
["get", \&Bget, 0,
"from OBJECT's plist, get value of property INDICATOR"],
["glob-filenames", \&Bglob_filenames, 0,
"return the list of file names matching PATTERN"],
["identity", \&Bquote, 0,
"return the argument"],
["if", \&Bif, 1,
"if COND is true, evaluate THEN-CLAUSE, otherwise all other clauses"],
["ignore", \&Bignore, 0,
"ignore all arguments and return nil"],
["incf", \&Bincf, 1,
"increment number VAR by DELTA (or 1) and return the new value"],
["intern", \&Bintern, 0,
"return symbol with name STRING"],
["labels", \&Blabels, 1,
"(labels ((sym args &rest body) ...) &rest body), define local function"],
["ignore", \&Bignore, 0, "ignore all arguments and return nil"],
["split-string", \&Bsplit_string, 0,
"split STRING into parts SEPARATED by SEP and return the list"],
["sqrt", \&Bsqrt, 0, "return the square root of numeric ARG"],
["lambda", \&Blambda, 1,
"define an anonymous function from ARGS and &rest BODY"],
["let", \&Blet, 1,
"evaluate body with local bindings: (let ((var value) ...) body)"],
["let*", \&Blet_star, 1,
"evaluate body with local bindings: (let* ((var value) ...) body)"],
["list", \&Blist, 0,
"return a new list from the arguments"],
["listp", \&Blistp, 0,
"return t if OBJECT is a list, 0, otherwise nil"],
["load", \&Bload, 0,
"load FILE, optional args NOERROR, NOMESSAGE"],
["load", \&Bload, 0,
"load expressions from specified file"],
["makunbound", \&Bmakunbound, 0,
"make SYMBOL's value be undefined"],
["null", \&Bnull, 0,
"return t if the argument is nil, nil otherwise"],
["numberp", \&Bnumberp, 0,
"return t if OBJECT is a number, otherwise nil"],
["or", \&Bor, 1,
"evaluate ARGS until one is non-nil and return the last evaluated value"],
["perl", \&Bperl, 0,
"evaluate the ARG string as Perl code and return the result"],
["pop", \&Bpop, 1,
"remove the first item of list in VAR, store changed VAR, return item"],
["prin1", \&Bprin1, 0,
"print ARG suitable for read"],
["princ", \&Bprinc, 0,
"print ARG to standard output without quoting"],
["princs", \&Bprincs, 0,
"princ ARG to a string and return the string"],
["print", \&Bprint, 0,
"print newline, ARG suitable for read, and space"],
["push", \&Bpush, 1,
"prepend ITEM to the list in VAR and store the result in VAR"],
["put", \&Bput, 0,
"on OBJECT's plist set property INDICATOR to VALUE"],
["quote", \&Bquote, 1,
"return the argument without evaluating it"],
["random", \&Brandom, 0,
"return a random number a with 0 <= a < LIMIT (or 1)"],
["re-match", \&Bre_match, 0,
"match REGEXP to a string and return the result(s)"],
["read", \&Bread, 0,
"return an expression read from stdin or &optional INPUT (a string)"],
["perl", \&Bperl, 0,
"evaluate the ARG string as Perl code and return the result"],
["remprop", \&Bremprop, 0,
"from SYMBOL's plist, remove property INDICATOR"],
["rplaca", \&Brplaca, 0,
"set the car of PAIR to NEWCAR and return NEWCAR"],
["rplacd", \&Brplacd, 0,
"set the cdr of PAIR to NEWCDR and return NEWCDR"],
["set", \&Bset, 0,
"set SYMBOL's value as a variable to VALUE, return VALUE"],
["setq", \&Bsetq, 1,
"set (implicitly quoted) VARIABLE to VALUE"],
["shell", \&Bshell, 0,
"run COMMAND as a shell command; &optional RETURN-OUTPUT"],
["env-ref", \&Benv_ref, 0,
"in ENV, look up SYMBOL, &optional not in NOPARENTS"],
["env-vars", \&Benv_vars, 0,
"show all vars in ENV, &optional not in NOPARENTS"],
["function-environment", \&Bfunction_environment, 0,
"return the environment of the specified FUNCTION"],
["cond", \&Bcond, 1,
"eval car of clauses until one is true, then eval rest of the clause"],
["incf", \&Bincf, 1,
"increment number VAR by DELTA (or 1) and return the new value"],
["decf", \&Bdecf, 1,
"decrement number VAR by DELTA (or 1) and return the new value"],
["dolist", \&Bdolist, 1,
"iterate over list (dolist (loopvar listform [resultform]) . bodyforms)"],
["split-string", \&Bsplit_string, 0,
"split STRING into parts SEPARATED by SEP and return the list"],
["sqrt", \&Bsqrt, 0,
"return the square root of numeric ARG"],
["string<", \&Bstring_less, 0,
"return t if argument strings are in strictly ascending order, nil else"],
["string=", \&Bstring_equal, 0,
"return t if all arguments are equal as strings, nil else"],
["stringp", \&Bstringp, 0,
"return t if OBJECT is a string, otherwise nil"],
["sublist", \&Bsublist, 0,
"return sublist of LIST beginning at START ending at END (zero-based)"],
["push", \&Bpush, 1,
"prepend ITEM to the list in VAR and store the result in VAR"],
["pop", \&Bpop, 1,
"remove the first item of list in VAR, store changed VAR, return item"],
["when", \&Bwhen, 1,
"if COND yields true, eval BODYFORMS and return the result of the last"],
["unless", \&Bunless, 1,
"if COND yields nil, eval BODYFORMS and return the result of the last"],
["environment", \&Benvironment, 0,
"bindings of ENVIRON (or current) as list of pairs, &optional NOPARENTS"],
["substr", \&Bsubstr, 0,
["substr", \&Bsubstr, 0,
"return the substring of STRING from START to &optional END"],
["symbol-function", \&Bsymbol_function, 0,
"return the value of the function cell of SYMBOL"],
["symbol-name", \&Bsymbol_name, 0,
"return the name of SYMBOL as a string"],
["symbol-plist", \&Bsymbol_plist, 0,
"return SYMBOL's plist"],
["symbolp", \&Bsymbolp, 0,
"return t if OBJECT is a symbol, otherwise nil"],
["symbols", \&Bsymbols, 0,
"return a list of all symbols"],
["terpri", \&Bterpri, 0,
"terminate a print line with a newline char"],
["the-environment", \&Bthe_environment, 0,
"return the current environment object"],
["truncate", \&Btruncate, 0,
"return NUMBER truncated to integer towards zero"],
["type-of", \&Btype_of, 0,
"return type of OBJECT as a symbol"],
["unless", \&Bunless, 1,
"if COND yields nil, eval BODYFORMS and return the result of the last"],
["when", \&Bwhen, 1,
"if COND yields true, eval BODYFORMS and return the result of the last"],
["while", \&Bwhile, 1,
"while COND is true, eval &rest CLAUSES"],
);
sub init {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment