diff options
| author | Dave Love | 2000-02-01 14:54:52 +0000 |
|---|---|---|
| committer | Dave Love | 2000-02-01 14:54:52 +0000 |
| commit | 1182a7cb4f860e87a697e6feba99ab2eeb5395a9 (patch) | |
| tree | 76172e6f68acd584a9d1a7468c5b3ec9e66c2718 /src/eval.c | |
| parent | a7bdfc083a0a041833e7d53953cdc25a009e03c3 (diff) | |
| download | emacs-1182a7cb4f860e87a697e6feba99ab2eeb5395a9.tar.gz emacs-1182a7cb4f860e87a697e6feba99ab2eeb5395a9.zip | |
Fix various doc strings not to duplicate information from
help-manyarg-func-alist.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/src/eval.c b/src/eval.c index 84d939dabf4..ad01cb4f021 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* Evaluator for GNU Emacs Lisp interpreter. | 1 | /* Evaluator for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985, 86, 87, 93, 94, 95, 1999 Free Software Foundation, Inc. | 2 | Copyright (C) 1985, 86, 87, 93, 94, 95, 99, 2000 |
| 3 | Free Software Foundation, Inc. | ||
| 3 | 4 | ||
| 4 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 5 | 6 | ||
| @@ -307,7 +308,7 @@ If no arg yields nil, return the last arg's value.") | |||
| 307 | } | 308 | } |
| 308 | 309 | ||
| 309 | DEFUN ("if", Fif, Sif, 2, UNEVALLED, 0, | 310 | DEFUN ("if", Fif, Sif, 2, UNEVALLED, 0, |
| 310 | "(if COND THEN ELSE...): if COND yields non-nil, do THEN, else do ELSE...\n\ | 311 | "If COND yields non-nil, do THEN, else do ELSE...\n\ |
| 311 | Returns the value of THEN or the value of the last of the ELSE's.\n\ | 312 | Returns the value of THEN or the value of the last of the ELSE's.\n\ |
| 312 | THEN must be one expression, but ELSE... can be zero or more expressions.\n\ | 313 | THEN must be one expression, but ELSE... can be zero or more expressions.\n\ |
| 313 | If COND yields nil, and there are no ELSE's, the value is nil.") | 314 | If COND yields nil, and there are no ELSE's, the value is nil.") |
| @@ -327,7 +328,7 @@ If COND yields nil, and there are no ELSE's, the value is nil.") | |||
| 327 | } | 328 | } |
| 328 | 329 | ||
| 329 | DEFUN ("cond", Fcond, Scond, 0, UNEVALLED, 0, | 330 | DEFUN ("cond", Fcond, Scond, 0, UNEVALLED, 0, |
| 330 | "(cond CLAUSES...): try each clause until one succeeds.\n\ | 331 | "Try each clause until one succeeds.\n\ |
| 331 | Each clause looks like (CONDITION BODY...). CONDITION is evaluated\n\ | 332 | Each clause looks like (CONDITION BODY...). CONDITION is evaluated\n\ |
| 332 | and, if the value is non-nil, this clause succeeds:\n\ | 333 | and, if the value is non-nil, this clause succeeds:\n\ |
| 333 | then the expressions in BODY are evaluated and the last one's\n\ | 334 | then the expressions in BODY are evaluated and the last one's\n\ |
| @@ -361,7 +362,7 @@ CONDITION's value if non-nil is returned from the cond-form.") | |||
| 361 | } | 362 | } |
| 362 | 363 | ||
| 363 | DEFUN ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0, | 364 | DEFUN ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0, |
| 364 | "(progn BODY...): eval BODY forms sequentially and return value of last one.") | 365 | "Eval BODY forms sequentially and return value of last one.") |
| 365 | (args) | 366 | (args) |
| 366 | Lisp_Object args; | 367 | Lisp_Object args; |
| 367 | { | 368 | { |
| @@ -399,7 +400,7 @@ DEFUN ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0, | |||
| 399 | } | 400 | } |
| 400 | 401 | ||
| 401 | DEFUN ("prog1", Fprog1, Sprog1, 1, UNEVALLED, 0, | 402 | DEFUN ("prog1", Fprog1, Sprog1, 1, UNEVALLED, 0, |
| 402 | "(prog1 FIRST BODY...): eval FIRST and BODY sequentially; value from FIRST.\n\ | 403 | "Eval FIRST and BODY sequentially; value from FIRST.\n\ |
| 403 | The value of FIRST is saved during the evaluation of the remaining args,\n\ | 404 | The value of FIRST is saved during the evaluation of the remaining args,\n\ |
| 404 | whose values are discarded.") | 405 | whose values are discarded.") |
| 405 | (args) | 406 | (args) |
| @@ -432,7 +433,7 @@ whose values are discarded.") | |||
| 432 | } | 433 | } |
| 433 | 434 | ||
| 434 | DEFUN ("prog2", Fprog2, Sprog2, 2, UNEVALLED, 0, | 435 | DEFUN ("prog2", Fprog2, Sprog2, 2, UNEVALLED, 0, |
| 435 | "(prog2 X Y BODY...): eval X, Y and BODY sequentially; value from Y.\n\ | 436 | "Eval X, Y and BODY sequentially; value from Y.\n\ |
| 436 | The value of Y is saved during the evaluation of the remaining args,\n\ | 437 | The value of Y is saved during the evaluation of the remaining args,\n\ |
| 437 | whose values are discarded.") | 438 | whose values are discarded.") |
| 438 | (args) | 439 | (args) |
| @@ -467,7 +468,7 @@ whose values are discarded.") | |||
| 467 | } | 468 | } |
| 468 | 469 | ||
| 469 | DEFUN ("setq", Fsetq, Ssetq, 0, UNEVALLED, 0, | 470 | DEFUN ("setq", Fsetq, Ssetq, 0, UNEVALLED, 0, |
| 470 | "(setq SYM VAL SYM VAL ...): set each SYM to the value of its VAL.\n\ | 471 | "Set each SYM to the value of its VAL.\n\ |
| 471 | The symbols SYM are variables; they are literal (not evaluated).\n\ | 472 | The symbols SYM are variables; they are literal (not evaluated).\n\ |
| 472 | The values VAL are expressions; they are evaluated.\n\ | 473 | The values VAL are expressions; they are evaluated.\n\ |
| 473 | Thus, (setq x (1+ y)) sets `x' to the value of `(1+ y)'.\n\ | 474 | Thus, (setq x (1+ y)) sets `x' to the value of `(1+ y)'.\n\ |
| @@ -568,7 +569,7 @@ and input is currently coming from the keyboard (not in keyboard macro).") | |||
| 568 | } | 569 | } |
| 569 | 570 | ||
| 570 | DEFUN ("defun", Fdefun, Sdefun, 2, UNEVALLED, 0, | 571 | DEFUN ("defun", Fdefun, Sdefun, 2, UNEVALLED, 0, |
| 571 | "(defun NAME ARGLIST [DOCSTRING] BODY...): define NAME as a function.\n\ | 572 | "Define NAME as a function.\n\ |
| 572 | The definition is (lambda ARGLIST [DOCSTRING] BODY...).\n\ | 573 | The definition is (lambda ARGLIST [DOCSTRING] BODY...).\n\ |
| 573 | See also the function `interactive'.") | 574 | See also the function `interactive'.") |
| 574 | (args) | 575 | (args) |
| @@ -587,7 +588,7 @@ See also the function `interactive'.") | |||
| 587 | } | 588 | } |
| 588 | 589 | ||
| 589 | DEFUN ("defmacro", Fdefmacro, Sdefmacro, 2, UNEVALLED, 0, | 590 | DEFUN ("defmacro", Fdefmacro, Sdefmacro, 2, UNEVALLED, 0, |
| 590 | "(defmacro NAME ARGLIST [DOCSTRING] BODY...): define NAME as a macro.\n\ | 591 | "Define NAME as a macro.\n\ |
| 591 | The definition is (macro lambda ARGLIST [DOCSTRING] BODY...).\n\ | 592 | The definition is (macro lambda ARGLIST [DOCSTRING] BODY...).\n\ |
| 592 | When the macro is called, as in (NAME ARGS...),\n\ | 593 | When the macro is called, as in (NAME ARGS...),\n\ |
| 593 | the function (lambda ARGLIST BODY...) is applied to\n\ | 594 | the function (lambda ARGLIST BODY...) is applied to\n\ |
| @@ -609,7 +610,7 @@ and the result should be a form to be evaluated instead of the original.") | |||
| 609 | } | 610 | } |
| 610 | 611 | ||
| 611 | DEFUN ("defvar", Fdefvar, Sdefvar, 1, UNEVALLED, 0, | 612 | DEFUN ("defvar", Fdefvar, Sdefvar, 1, UNEVALLED, 0, |
| 612 | "(defvar SYMBOL INITVALUE DOCSTRING): define SYMBOL as a variable.\n\ | 613 | "Define SYMBOL as a variable.\n\ |
| 613 | You are not required to define a variable in order to use it,\n\ | 614 | You are not required to define a variable in order to use it,\n\ |
| 614 | but the definition can supply documentation and an initial value\n\ | 615 | but the definition can supply documentation and an initial value\n\ |
| 615 | in a way that tags can recognize.\n\n\ | 616 | in a way that tags can recognize.\n\n\ |
| @@ -649,7 +650,7 @@ If INITVALUE is missing, SYMBOL's value is not set.") | |||
| 649 | } | 650 | } |
| 650 | 651 | ||
| 651 | DEFUN ("defconst", Fdefconst, Sdefconst, 2, UNEVALLED, 0, | 652 | DEFUN ("defconst", Fdefconst, Sdefconst, 2, UNEVALLED, 0, |
| 652 | "(defconst SYMBOL INITVALUE DOCSTRING): define SYMBOL as a constant variable.\n\ | 653 | "Define SYMBOL as a constant variable.\n\ |
| 653 | The intent is that neither programs nor users should ever change this value.\n\ | 654 | The intent is that neither programs nor users should ever change this value.\n\ |
| 654 | Always sets the value of SYMBOL to the result of evalling INITVALUE.\n\ | 655 | Always sets the value of SYMBOL to the result of evalling INITVALUE.\n\ |
| 655 | If SYMBOL is buffer-local, its default value is what is set;\n\ | 656 | If SYMBOL is buffer-local, its default value is what is set;\n\ |
| @@ -664,7 +665,10 @@ DOCSTRING is optional.") | |||
| 664 | if (!NILP (Fcdr (Fcdr (Fcdr (args))))) | 665 | if (!NILP (Fcdr (Fcdr (Fcdr (args))))) |
| 665 | error ("too many arguments"); | 666 | error ("too many arguments"); |
| 666 | 667 | ||
| 667 | Fset_default (sym, Feval (Fcar (Fcdr (args)))); | 668 | tem = Feval (Fcar (Fcdr (args))); |
| 669 | if (!NILP (Vpurify_flag)) | ||
| 670 | tem = Fpurecopy (tem); | ||
| 671 | Fset_default (sym, tem); | ||
| 668 | tem = Fcar (Fcdr (Fcdr (args))); | 672 | tem = Fcar (Fcdr (Fcdr (args))); |
| 669 | if (!NILP (tem)) | 673 | if (!NILP (tem)) |
| 670 | { | 674 | { |
| @@ -712,7 +716,7 @@ on its property list).") | |||
| 712 | } | 716 | } |
| 713 | 717 | ||
| 714 | DEFUN ("let*", FletX, SletX, 1, UNEVALLED, 0, | 718 | DEFUN ("let*", FletX, SletX, 1, UNEVALLED, 0, |
| 715 | "(let* VARLIST BODY...): bind variables according to VARLIST then eval BODY.\n\ | 719 | "Bind variables according to VARLIST then eval BODY.\n\ |
| 716 | The value of the last form in BODY is returned.\n\ | 720 | The value of the last form in BODY is returned.\n\ |
| 717 | Each element of VARLIST is a symbol (which is bound to nil)\n\ | 721 | Each element of VARLIST is a symbol (which is bound to nil)\n\ |
| 718 | or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).\n\ | 722 | or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).\n\ |
| @@ -750,7 +754,7 @@ Each VALUEFORM can refer to the symbols already bound by this VARLIST.") | |||
| 750 | } | 754 | } |
| 751 | 755 | ||
| 752 | DEFUN ("let", Flet, Slet, 1, UNEVALLED, 0, | 756 | DEFUN ("let", Flet, Slet, 1, UNEVALLED, 0, |
| 753 | "(let VARLIST BODY...): bind variables according to VARLIST then eval BODY.\n\ | 757 | "Bind variables according to VARLIST then eval BODY.\n\ |
| 754 | The value of the last form in BODY is returned.\n\ | 758 | The value of the last form in BODY is returned.\n\ |
| 755 | Each element of VARLIST is a symbol (which is bound to nil)\n\ | 759 | Each element of VARLIST is a symbol (which is bound to nil)\n\ |
| 756 | or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).\n\ | 760 | or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).\n\ |
| @@ -807,7 +811,7 @@ All the VALUEFORMs are evalled before any symbols are bound.") | |||
| 807 | } | 811 | } |
| 808 | 812 | ||
| 809 | DEFUN ("while", Fwhile, Swhile, 1, UNEVALLED, 0, | 813 | DEFUN ("while", Fwhile, Swhile, 1, UNEVALLED, 0, |
| 810 | "(while TEST BODY...): if TEST yields non-nil, eval BODY... and repeat.\n\ | 814 | "If TEST yields non-nil, eval BODY... and repeat.\n\ |
| 811 | The order of execution is thus TEST, BODY, TEST, BODY and so on\n\ | 815 | The order of execution is thus TEST, BODY, TEST, BODY and so on\n\ |
| 812 | until TEST returns nil.") | 816 | until TEST returns nil.") |
| 813 | (args) | 817 | (args) |
| @@ -910,7 +914,7 @@ definitions to shadow the loaded ones for use in file byte-compilation.") | |||
| 910 | } | 914 | } |
| 911 | 915 | ||
| 912 | DEFUN ("catch", Fcatch, Scatch, 1, UNEVALLED, 0, | 916 | DEFUN ("catch", Fcatch, Scatch, 1, UNEVALLED, 0, |
| 913 | "(catch TAG BODY...): eval BODY allowing nonlocal exits using `throw'.\n\ | 917 | "Eval BODY allowing nonlocal exits using `throw'.\n\ |
| 914 | TAG is evalled to get the tag to use; it must not be nil.\n\ | 918 | TAG is evalled to get the tag to use; it must not be nil.\n\ |
| 915 | \n\ | 919 | \n\ |
| 916 | Then the BODY is executed.\n\ | 920 | Then the BODY is executed.\n\ |
| @@ -1020,7 +1024,7 @@ unwind_to_catch (catch, value) | |||
| 1020 | } | 1024 | } |
| 1021 | 1025 | ||
| 1022 | DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0, | 1026 | DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0, |
| 1023 | "(throw TAG VALUE): throw to the catch for TAG and return VALUE from it.\n\ | 1027 | "Throw to the catch for TAG and return VALUE from it.\n\ |
| 1024 | Both TAG and VALUE are evalled.") | 1028 | Both TAG and VALUE are evalled.") |
| 1025 | (tag, value) | 1029 | (tag, value) |
| 1026 | register Lisp_Object tag, value; | 1030 | register Lisp_Object tag, value; |
| @@ -1042,7 +1046,6 @@ Both TAG and VALUE are evalled.") | |||
| 1042 | 1046 | ||
| 1043 | DEFUN ("unwind-protect", Funwind_protect, Sunwind_protect, 1, UNEVALLED, 0, | 1047 | DEFUN ("unwind-protect", Funwind_protect, Sunwind_protect, 1, UNEVALLED, 0, |
| 1044 | "Do BODYFORM, protecting with UNWINDFORMS.\n\ | 1048 | "Do BODYFORM, protecting with UNWINDFORMS.\n\ |
| 1045 | Usage looks like (unwind-protect BODYFORM UNWINDFORMS...).\n\ | ||
| 1046 | If BODYFORM completes normally, its value is returned\n\ | 1049 | If BODYFORM completes normally, its value is returned\n\ |
| 1047 | after executing the UNWINDFORMS.\n\ | 1050 | after executing the UNWINDFORMS.\n\ |
| 1048 | If BODYFORM exits nonlocally, the UNWINDFORMS are executed anyway.") | 1051 | If BODYFORM exits nonlocally, the UNWINDFORMS are executed anyway.") |
| @@ -1067,7 +1070,6 @@ struct handler *handlerlist; | |||
| 1067 | 1070 | ||
| 1068 | DEFUN ("condition-case", Fcondition_case, Scondition_case, 2, UNEVALLED, 0, | 1071 | DEFUN ("condition-case", Fcondition_case, Scondition_case, 2, UNEVALLED, 0, |
| 1069 | "Regain control when an error is signaled.\n\ | 1072 | "Regain control when an error is signaled.\n\ |
| 1070 | Usage looks like (condition-case VAR BODYFORM HANDLERS...).\n\ | ||
| 1071 | executes BODYFORM and returns its value if no error happens.\n\ | 1073 | executes BODYFORM and returns its value if no error happens.\n\ |
| 1072 | Each element of HANDLERS looks like (CONDITION-NAME BODY...)\n\ | 1074 | Each element of HANDLERS looks like (CONDITION-NAME BODY...)\n\ |
| 1073 | where the BODY is made of Lisp expressions.\n\n\ | 1075 | where the BODY is made of Lisp expressions.\n\n\ |