with-local-quit

with-local-quit is a Lisp macro in `subr.el'.

(with-local-quit &rest BODY)

Execute BODY, allowing quits to terminate BODY but not escape further.
When a quit terminates BODY, `with-local-quit' returns nil but
requests another quit. That quit will be processed as soon as quitting
is allowed once again. (Immediately, if `inhibit-quit' is nil.)