Function: catch

catch is a special form defined in eval.c.

Signature

(catch TAG BODY...)

Documentation

Eval BODY allowing nonlocal exits using throw.

TAG is evalled to get the tag to use; it must not be nil.

Then the BODY is executed. Within BODY, a call to throw with the same TAG exits BODY and this catch. If no throw happens, catch returns the value of the last BODY form. If a throw happens, it specifies the value to return from catch.

View in manual

Probably introduced at or before Emacs version 13.8.

Source Code

// Defined in /usr/src/emacs/src/eval.c
{
  Lisp_Object tag = eval_sub (XCAR (args));
  return internal_catch (tag, Fprogn, XCDR (args));
}