Mercurial > emacs
comparison lisp/subr.el @ 67899:7c797468d04b
(noreturn, 1value): Doc fixes.
author | Luc Teirlinck <teirllm@auburn.edu> |
---|---|
date | Fri, 30 Dec 2005 02:59:47 +0000 |
parents | d3f449ec33bd |
children | 15149da0b974 |
comparison
equal
deleted
inserted
replaced
67898:bd49367311fe | 67899:7c797468d04b |
---|---|
40 ;;;; Basic Lisp macros. | 40 ;;;; Basic Lisp macros. |
41 | 41 |
42 (defalias 'not 'null) | 42 (defalias 'not 'null) |
43 | 43 |
44 (defmacro noreturn (form) | 44 (defmacro noreturn (form) |
45 "Evaluates FORM, with the expectation that the evaluation will signal an error | 45 "Evaluate FORM, expecting it not to return. |
46 instead of returning to its caller. If FORM does return, an error is | 46 If FORM does return, signal an error." |
47 signaled." | |
48 `(prog1 ,form | 47 `(prog1 ,form |
49 (error "Form marked with `noreturn' did return"))) | 48 (error "Form marked with `noreturn' did return"))) |
50 | 49 |
51 (defmacro 1value (form) | 50 (defmacro 1value (form) |
52 "Evaluates FORM, with the expectation that the same value will be returned | 51 "Evaluate FORM, expecting a constant return value. |
53 from all evaluations of FORM. This is the global do-nothing | 52 This is the global do-nothing version. There is also `testcover-1value' |
54 version of `1value'. There is also `testcover-1value' that | 53 that complains if FORM ever does return differing values." |
55 complains if FORM ever does return differing values." | |
56 form) | 54 form) |
57 | 55 |
58 (defmacro lambda (&rest cdr) | 56 (defmacro lambda (&rest cdr) |
59 "Return a lambda expression. | 57 "Return a lambda expression. |
60 A call of the form (lambda ARGS DOCSTRING INTERACTIVE BODY) is | 58 A call of the form (lambda ARGS DOCSTRING INTERACTIVE BODY) is |