Control the screen output generated from an event form.
(control-screen-output verbose form) → form-with-output-controlled
If
This function can be used in a macro of the following form:
(defmacro mac (... &key verbose ...) (control-screen-output verbose `(make-event ...)))Invoking
Function:
(defun control-screen-output (verbose form) (declare (xargs :guard (pseudo-event-formp form))) (let ((__function__ 'control-screen-output)) (declare (ignorable __function__)) (cond ((maybe-unquote verbose) form) (t (cons 'with-output (cons ':gag-mode (cons 'nil (cons ':off (cons ':all (cons ':on (cons 'error (cons form 'nil))))))))))))
Theorem:
(defthm pseudo-event-formp-of-control-screen-output (implies (and (pseudo-event-formp form)) (b* ((form-with-output-controlled (control-screen-output verbose form))) (pseudo-event-formp form-with-output-controlled))) :rule-classes :rewrite)