# HG changeset patch # User Jonathan Yavner # Date 1070175419 0 # Node ID 61703d3393d62b927f18d21006c01bd1cdaa868b # Parent b3327f1ed9e1093084df32214b2c5d7fc9e8b07d Add macros `1value' and `noreturn'. diff -r b3327f1ed9e1 -r 61703d3393d6 lisp/subr.el --- a/lisp/subr.el Sun Nov 30 06:56:28 2003 +0000 +++ b/lisp/subr.el Sun Nov 30 06:56:59 2003 +0000 @@ -62,6 +62,20 @@ (defalias 'not 'null) +(defmacro noreturn (form) + "Evaluates FORM, with the expectation that the evaluation will signal an error +instead of returning to its caller. If FORM does return, an error is +signalled." + `(prog1 ,form + (error "Form marked with `noreturn' did return"))) + +(defmacro 1value (form) + "Evaluates FORM, with the expectation that all the same value will be returned +from all evaluations of FORM. This is the global do-nothing +version of `1value'. There is also `testcover-1value' that +complains if FORM ever does return differing values." + form) + (defmacro lambda (&rest cdr) "Return a lambda expression. A call of the form (lambda ARGS DOCSTRING INTERACTIVE BODY) is