aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Yavner2003-11-30 06:56:59 +0000
committerJonathan Yavner2003-11-30 06:56:59 +0000
commit1116910a519ba0e4ff84b9a83ff5207aa4fe5a24 (patch)
treef46689c4d03138b587a3ff6b01a1f2cd655de53f
parentbbaa142972a148a3a6cc68c2a8aaf973aaf2135f (diff)
downloademacs-1116910a519ba0e4ff84b9a83ff5207aa4fe5a24.tar.gz
emacs-1116910a519ba0e4ff84b9a83ff5207aa4fe5a24.zip
Add macros `1value' and `noreturn'.
-rw-r--r--lisp/subr.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index dba7331f98c..2996f2903e0 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -62,6 +62,20 @@ The return value of this function is not used."
62 62
63(defalias 'not 'null) 63(defalias 'not 'null)
64 64
65(defmacro noreturn (form)
66 "Evaluates FORM, with the expectation that the evaluation will signal an error
67instead of returning to its caller. If FORM does return, an error is
68signalled."
69 `(prog1 ,form
70 (error "Form marked with `noreturn' did return")))
71
72(defmacro 1value (form)
73 "Evaluates FORM, with the expectation that all the same value will be returned
74from all evaluations of FORM. This is the global do-nothing
75version of `1value'. There is also `testcover-1value' that
76complains if FORM ever does return differing values."
77 form)
78
65(defmacro lambda (&rest cdr) 79(defmacro lambda (&rest cdr)
66 "Return a lambda expression. 80 "Return a lambda expression.
67A call of the form (lambda ARGS DOCSTRING INTERACTIVE BODY) is 81A call of the form (lambda ARGS DOCSTRING INTERACTIVE BODY) is