aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorDave Love2000-02-01 14:54:52 +0000
committerDave Love2000-02-01 14:54:52 +0000
commit1182a7cb4f860e87a697e6feba99ab2eeb5395a9 (patch)
tree76172e6f68acd584a9d1a7468c5b3ec9e66c2718 /src/eval.c
parenta7bdfc083a0a041833e7d53953cdc25a009e03c3 (diff)
downloademacs-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.c40
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
4This file is part of GNU Emacs. 5This 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
309DEFUN ("if", Fif, Sif, 2, UNEVALLED, 0, 310DEFUN ("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\
311Returns the value of THEN or the value of the last of the ELSE's.\n\ 312Returns the value of THEN or the value of the last of the ELSE's.\n\
312THEN must be one expression, but ELSE... can be zero or more expressions.\n\ 313THEN must be one expression, but ELSE... can be zero or more expressions.\n\
313If COND yields nil, and there are no ELSE's, the value is nil.") 314If 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
329DEFUN ("cond", Fcond, Scond, 0, UNEVALLED, 0, 330DEFUN ("cond", Fcond, Scond, 0, UNEVALLED, 0,
330 "(cond CLAUSES...): try each clause until one succeeds.\n\ 331 "Try each clause until one succeeds.\n\
331Each clause looks like (CONDITION BODY...). CONDITION is evaluated\n\ 332Each clause looks like (CONDITION BODY...). CONDITION is evaluated\n\
332and, if the value is non-nil, this clause succeeds:\n\ 333and, if the value is non-nil, this clause succeeds:\n\
333then the expressions in BODY are evaluated and the last one's\n\ 334then 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
363DEFUN ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0, 364DEFUN ("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
401DEFUN ("prog1", Fprog1, Sprog1, 1, UNEVALLED, 0, 402DEFUN ("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\
403The value of FIRST is saved during the evaluation of the remaining args,\n\ 404The value of FIRST is saved during the evaluation of the remaining args,\n\
404whose values are discarded.") 405whose values are discarded.")
405 (args) 406 (args)
@@ -432,7 +433,7 @@ whose values are discarded.")
432} 433}
433 434
434DEFUN ("prog2", Fprog2, Sprog2, 2, UNEVALLED, 0, 435DEFUN ("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\
436The value of Y is saved during the evaluation of the remaining args,\n\ 437The value of Y is saved during the evaluation of the remaining args,\n\
437whose values are discarded.") 438whose values are discarded.")
438 (args) 439 (args)
@@ -467,7 +468,7 @@ whose values are discarded.")
467} 468}
468 469
469DEFUN ("setq", Fsetq, Ssetq, 0, UNEVALLED, 0, 470DEFUN ("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\
471The symbols SYM are variables; they are literal (not evaluated).\n\ 472The symbols SYM are variables; they are literal (not evaluated).\n\
472The values VAL are expressions; they are evaluated.\n\ 473The values VAL are expressions; they are evaluated.\n\
473Thus, (setq x (1+ y)) sets `x' to the value of `(1+ y)'.\n\ 474Thus, (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
570DEFUN ("defun", Fdefun, Sdefun, 2, UNEVALLED, 0, 571DEFUN ("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\
572The definition is (lambda ARGLIST [DOCSTRING] BODY...).\n\ 573The definition is (lambda ARGLIST [DOCSTRING] BODY...).\n\
573See also the function `interactive'.") 574See also the function `interactive'.")
574 (args) 575 (args)
@@ -587,7 +588,7 @@ See also the function `interactive'.")
587} 588}
588 589
589DEFUN ("defmacro", Fdefmacro, Sdefmacro, 2, UNEVALLED, 0, 590DEFUN ("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\
591The definition is (macro lambda ARGLIST [DOCSTRING] BODY...).\n\ 592The definition is (macro lambda ARGLIST [DOCSTRING] BODY...).\n\
592When the macro is called, as in (NAME ARGS...),\n\ 593When the macro is called, as in (NAME ARGS...),\n\
593the function (lambda ARGLIST BODY...) is applied to\n\ 594the 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
611DEFUN ("defvar", Fdefvar, Sdefvar, 1, UNEVALLED, 0, 612DEFUN ("defvar", Fdefvar, Sdefvar, 1, UNEVALLED, 0,
612 "(defvar SYMBOL INITVALUE DOCSTRING): define SYMBOL as a variable.\n\ 613 "Define SYMBOL as a variable.\n\
613You are not required to define a variable in order to use it,\n\ 614You are not required to define a variable in order to use it,\n\
614but the definition can supply documentation and an initial value\n\ 615but the definition can supply documentation and an initial value\n\
615in a way that tags can recognize.\n\n\ 616in 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
651DEFUN ("defconst", Fdefconst, Sdefconst, 2, UNEVALLED, 0, 652DEFUN ("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\
653The intent is that neither programs nor users should ever change this value.\n\ 654The intent is that neither programs nor users should ever change this value.\n\
654Always sets the value of SYMBOL to the result of evalling INITVALUE.\n\ 655Always sets the value of SYMBOL to the result of evalling INITVALUE.\n\
655If SYMBOL is buffer-local, its default value is what is set;\n\ 656If 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
714DEFUN ("let*", FletX, SletX, 1, UNEVALLED, 0, 718DEFUN ("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\
716The value of the last form in BODY is returned.\n\ 720The value of the last form in BODY is returned.\n\
717Each element of VARLIST is a symbol (which is bound to nil)\n\ 721Each element of VARLIST is a symbol (which is bound to nil)\n\
718or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).\n\ 722or 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
752DEFUN ("let", Flet, Slet, 1, UNEVALLED, 0, 756DEFUN ("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\
754The value of the last form in BODY is returned.\n\ 758The value of the last form in BODY is returned.\n\
755Each element of VARLIST is a symbol (which is bound to nil)\n\ 759Each element of VARLIST is a symbol (which is bound to nil)\n\
756or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).\n\ 760or 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
809DEFUN ("while", Fwhile, Swhile, 1, UNEVALLED, 0, 813DEFUN ("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\
811The order of execution is thus TEST, BODY, TEST, BODY and so on\n\ 815The order of execution is thus TEST, BODY, TEST, BODY and so on\n\
812until TEST returns nil.") 816until 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
912DEFUN ("catch", Fcatch, Scatch, 1, UNEVALLED, 0, 916DEFUN ("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\
914TAG is evalled to get the tag to use; it must not be nil.\n\ 918TAG is evalled to get the tag to use; it must not be nil.\n\
915\n\ 919\n\
916Then the BODY is executed.\n\ 920Then the BODY is executed.\n\
@@ -1020,7 +1024,7 @@ unwind_to_catch (catch, value)
1020} 1024}
1021 1025
1022DEFUN ("throw", Fthrow, Sthrow, 2, 2, 0, 1026DEFUN ("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\
1024Both TAG and VALUE are evalled.") 1028Both 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
1043DEFUN ("unwind-protect", Funwind_protect, Sunwind_protect, 1, UNEVALLED, 0, 1047DEFUN ("unwind-protect", Funwind_protect, Sunwind_protect, 1, UNEVALLED, 0,
1044 "Do BODYFORM, protecting with UNWINDFORMS.\n\ 1048 "Do BODYFORM, protecting with UNWINDFORMS.\n\
1045Usage looks like (unwind-protect BODYFORM UNWINDFORMS...).\n\
1046If BODYFORM completes normally, its value is returned\n\ 1049If BODYFORM completes normally, its value is returned\n\
1047after executing the UNWINDFORMS.\n\ 1050after executing the UNWINDFORMS.\n\
1048If BODYFORM exits nonlocally, the UNWINDFORMS are executed anyway.") 1051If BODYFORM exits nonlocally, the UNWINDFORMS are executed anyway.")
@@ -1067,7 +1070,6 @@ struct handler *handlerlist;
1067 1070
1068DEFUN ("condition-case", Fcondition_case, Scondition_case, 2, UNEVALLED, 0, 1071DEFUN ("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\
1070Usage looks like (condition-case VAR BODYFORM HANDLERS...).\n\
1071executes BODYFORM and returns its value if no error happens.\n\ 1073executes BODYFORM and returns its value if no error happens.\n\
1072Each element of HANDLERS looks like (CONDITION-NAME BODY...)\n\ 1074Each element of HANDLERS looks like (CONDITION-NAME BODY...)\n\
1073where the BODY is made of Lisp expressions.\n\n\ 1075where the BODY is made of Lisp expressions.\n\n\