/[emacs]/emacs/src/eval.c
ViewVC logotype

Diff of /emacs/src/eval.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.176 by monnier, Mon Nov 26 23:29:48 2001 UTC revision 1.177 by monnier, Wed Dec 5 01:39:21 2001 UTC
# Line 286  DEFUN ("or", For, Sor, 0, UNEVALLED, 0, Line 286  DEFUN ("or", For, Sor, 0, UNEVALLED, 0,
286         doc: /* Eval args until one of them yields non-nil, then return that value.         doc: /* Eval args until one of them yields non-nil, then return that value.
287  The remaining args are not evalled at all.  The remaining args are not evalled at all.
288  If all args return nil, return nil.  If all args return nil, return nil.
289  usage: (or CONDITIONS ...)  */)  usage: (or &rest CONDITIONS)  */)
290       (args)       (args)
291       Lisp_Object args;       Lisp_Object args;
292  {  {
# Line 317  DEFUN ("and", Fand, Sand, 0, UNEVALLED, Line 317  DEFUN ("and", Fand, Sand, 0, UNEVALLED,
317         doc: /* Eval args until one of them yields nil, then return nil.         doc: /* Eval args until one of them yields nil, then return nil.
318  The remaining args are not evalled at all.  The remaining args are not evalled at all.
319  If no arg yields nil, return the last arg's value.  If no arg yields nil, return the last arg's value.
320  usage: (and CONDITIONS ...)  */)  usage: (and &rest CONDITIONS)  */)
321       (args)       (args)
322       Lisp_Object args;       Lisp_Object args;
323  {  {
# Line 349  DEFUN ("if", Fif, Sif, 2, UNEVALLED, 0, Line 349  DEFUN ("if", Fif, Sif, 2, UNEVALLED, 0,
349  Returns the value of THEN or the value of the last of the ELSE's.  Returns the value of THEN or the value of the last of the ELSE's.
350  THEN must be one expression, but ELSE... can be zero or more expressions.  THEN must be one expression, but ELSE... can be zero or more expressions.
351  If COND yields nil, and there are no ELSE's, the value is nil.  If COND yields nil, and there are no ELSE's, the value is nil.
352  usage: (if COND THEN ELSE...)  */)  usage: (if COND THEN &rest ELSE)  */)
353       (args)       (args)
354       Lisp_Object args;       Lisp_Object args;
355  {  {
# Line 374  value is the value of the cond-form. Line 374  value is the value of the cond-form.
374  If no clause succeeds, cond returns nil.  If no clause succeeds, cond returns nil.
375  If a clause has one element, as in (CONDITION),  If a clause has one element, as in (CONDITION),
376  CONDITION's value if non-nil is returned from the cond-form.  CONDITION's value if non-nil is returned from the cond-form.
377  usage: (cond CLAUSES...)  */)  usage: (cond &rest CLAUSES)  */)
378       (args)       (args)
379       Lisp_Object args;       Lisp_Object args;
380  {  {
# Line 402  usage: (cond CLAUSES...)  */) Line 402  usage: (cond CLAUSES...)  */)
402    
403  DEFUN ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0,  DEFUN ("progn", Fprogn, Sprogn, 0, UNEVALLED, 0,
404         doc: /* Eval BODY forms sequentially and return value of last one.         doc: /* Eval BODY forms sequentially and return value of last one.
405  usage: (progn BODY ...)  */)  usage: (progn &rest BODY)  */)
406       (args)       (args)
407       Lisp_Object args;       Lisp_Object args;
408  {  {
# Line 443  DEFUN ("prog1", Fprog1, Sprog1, 1, UNEVA Line 443  DEFUN ("prog1", Fprog1, Sprog1, 1, UNEVA
443         doc: /* Eval FIRST and BODY sequentially; value from FIRST.         doc: /* Eval FIRST and BODY sequentially; value from FIRST.
444  The value of FIRST is saved during the evaluation of the remaining args,  The value of FIRST is saved during the evaluation of the remaining args,
445  whose values are discarded.  whose values are discarded.
446  usage: (prog1 FIRST BODY...)  */)  usage: (prog1 FIRST &rest BODY)  */)
447       (args)       (args)
448       Lisp_Object args;       Lisp_Object args;
449  {  {
# Line 477  DEFUN ("prog2", Fprog2, Sprog2, 2, UNEVA Line 477  DEFUN ("prog2", Fprog2, Sprog2, 2, UNEVA
477         doc: /* Eval X, Y and BODY sequentially; value from Y.         doc: /* Eval X, Y and BODY sequentially; value from Y.
478  The value of Y is saved during the evaluation of the remaining args,  The value of Y is saved during the evaluation of the remaining args,
479  whose values are discarded.  whose values are discarded.
480  usage: (prog2 X Y BODY...)  */)  usage: (prog2 X Y &rest BODY)  */)
481       (args)       (args)
482       Lisp_Object args;       Lisp_Object args;
483  {  {
# Line 637  DEFUN ("defun", Fdefun, Sdefun, 2, UNEVA Line 637  DEFUN ("defun", Fdefun, Sdefun, 2, UNEVA
637         doc: /* Define NAME as a function.         doc: /* Define NAME as a function.
638  The definition is (lambda ARGLIST [DOCSTRING] BODY...).  The definition is (lambda ARGLIST [DOCSTRING] BODY...).
639  See also the function `interactive'.  See also the function `interactive'.
640  usage: (defun NAME ARGLIST [DOCSTRING] BODY...)  */)  usage: (defun NAME ARGLIST &optional DOCSTRING &rest BODY)  */)
641       (args)       (args)
642       Lisp_Object args;       Lisp_Object args;
643  {  {
# Line 660  When the macro is called, as in (NAME AR Line 660  When the macro is called, as in (NAME AR
660  the function (lambda ARGLIST BODY...) is applied to  the function (lambda ARGLIST BODY...) is applied to
661  the list ARGS... as it appears in the expression,  the list ARGS... as it appears in the expression,
662  and the result should be a form to be evaluated instead of the original.  and the result should be a form to be evaluated instead of the original.
663  usage: (defmacro NAME ARGLIST [DOCSTRING] BODY...)  */)  usage: (defmacro NAME ARGLIST &optional DOCSTRING &rest BODY)  */)
664       (args)       (args)
665       Lisp_Object args;       Lisp_Object args;
666  {  {
# Line 760  Always sets the value of SYMBOL to the r Line 760  Always sets the value of SYMBOL to the r
760  If SYMBOL is buffer-local, its default value is what is set;  If SYMBOL is buffer-local, its default value is what is set;
761   buffer-local values are not affected.   buffer-local values are not affected.
762  DOCSTRING is optional.  DOCSTRING is optional.
763  usage: (defconst SYMBOL INITVALUE [DOCSTRING])  */)  usage: (defconst SYMBOL INITVALUE &optional DOCSTRING)  */)
764       (args)       (args)
765       Lisp_Object args;       Lisp_Object args;
766  {  {
# Line 826  The value of the last form in BODY is re Line 826  The value of the last form in BODY is re
826  Each element of VARLIST is a symbol (which is bound to nil)  Each element of VARLIST is a symbol (which is bound to nil)
827  or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).  or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).
828  Each VALUEFORM can refer to the symbols already bound by this VARLIST.  Each VALUEFORM can refer to the symbols already bound by this VARLIST.
829  usage: (let* VARLIST BODY...)  */)  usage: (let* VARLIST &rest BODY)  */)
830       (args)       (args)
831       Lisp_Object args;       Lisp_Object args;
832  {  {
# Line 865  The value of the last form in BODY is re Line 865  The value of the last form in BODY is re
865  Each element of VARLIST is a symbol (which is bound to nil)  Each element of VARLIST is a symbol (which is bound to nil)
866  or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).  or a list (SYMBOL VALUEFORM) (which binds SYMBOL to the value of VALUEFORM).
867  All the VALUEFORMs are evalled before any symbols are bound.  All the VALUEFORMs are evalled before any symbols are bound.
868  usage: (let VARLIST BODY...)  */)  usage: (let VARLIST &rest BODY)  */)
869       (args)       (args)
870       Lisp_Object args;       Lisp_Object args;
871  {  {
# Line 921  DEFUN ("while", Fwhile, Swhile, 1, UNEVA Line 921  DEFUN ("while", Fwhile, Swhile, 1, UNEVA
921         doc: /* If TEST yields non-nil, eval BODY... and repeat.         doc: /* If TEST yields non-nil, eval BODY... and repeat.
922  The order of execution is thus TEST, BODY, TEST, BODY and so on  The order of execution is thus TEST, BODY, TEST, BODY and so on
923  until TEST returns nil.  until TEST returns nil.
924  usage: (while TEST BODY...)  */)  usage: (while TEST &rest BODY)  */)
925       (args)       (args)
926       Lisp_Object args;       Lisp_Object args;
927  {  {
# Line 1030  Then the BODY is executed. Line 1030  Then the BODY is executed.
1030  Within BODY, (throw TAG) with same tag exits BODY and exits this `catch'.  Within BODY, (throw TAG) with same tag exits BODY and exits this `catch'.
1031  If no throw happens, `catch' returns the value of the last BODY form.  If no throw happens, `catch' returns the value of the last BODY form.
1032  If a throw happens, it specifies the value to return from `catch'.  If a throw happens, it specifies the value to return from `catch'.
1033  usage: (catch TAG BODY...)  */)  usage: (catch TAG &rest BODY)  */)
1034       (args)       (args)
1035       Lisp_Object args;       Lisp_Object args;
1036  {  {
# Line 1159  DEFUN ("unwind-protect", Funwind_protect Line 1159  DEFUN ("unwind-protect", Funwind_protect
1159  If BODYFORM completes normally, its value is returned  If BODYFORM completes normally, its value is returned
1160  after executing the UNWINDFORMS.  after executing the UNWINDFORMS.
1161  If BODYFORM exits nonlocally, the UNWINDFORMS are executed anyway.  If BODYFORM exits nonlocally, the UNWINDFORMS are executed anyway.
1162  usage: (unwind-protect BODYFORM UNWINDFORMS...)  */)  usage: (unwind-protect BODYFORM &rest UNWINDFORMS)  */)
1163       (args)       (args)
1164       Lisp_Object args;       Lisp_Object args;
1165  {  {
# Line 1199  VAR may be nil; then you do not get acce Line 1199  VAR may be nil; then you do not get acce
1199    
1200  The value of the last BODY form is returned from the condition-case.  The value of the last BODY form is returned from the condition-case.
1201  See also the function `signal' for more info.  See also the function `signal' for more info.
1202  usage: (condition-case VAR BODYFORM HANDLERS...)  */)  usage: (condition-case VAR BODYFORM &rest HANDLERS)  */)
1203       (args)       (args)
1204       Lisp_Object args;       Lisp_Object args;
1205  {  {

Legend:
Removed from v.1.176  
changed lines
  Added in v.1.177

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26