Function: cl-return-from
cl-return-from is an autoloaded macro defined in cl-macs.el.gz.
Signature
(cl-return-from NAME &optional RESULT)
Documentation
Return from the block named NAME.
This jumps out to the innermost enclosing (cl-block NAME ...) form,
returning RESULT from that form (or nil if RESULT is omitted).
This is compatible with Common Lisp, but note that defun and
defmacro do not create implicit blocks as they do in Common Lisp.
Aliases
return-from (obsolete since 27.1)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-macs.el.gz
;;;###autoload
(defmacro cl-return-from (name &optional result)
"Return from the block named NAME.
This jumps out to the innermost enclosing `(cl-block NAME ...)' form,
returning RESULT from that form (or nil if RESULT is omitted).
This is compatible with Common Lisp, but note that `defun' and
`defmacro' do not create implicit blocks as they do in Common Lisp."
(declare (indent 1) (debug (symbolp &optional form)))
(let ((name2 (intern (format "--cl-block-%s--" name))))
`(cl--block-throw ',name2 ,result)))