Plaster

common-lisp
(defmacro with-new-tempo ((tempo-val) &body body) (alexandria:with-gensyms (temp) `(let ((,temp *tempo*)) (unwind-protect (progn (setf *tempo* ,tempo-val) (locally ,@body)) (setf *tempo* ,temp))))) (let ((*tempo* 500)) (print *tempo*) (with-new-tempo (300) (print *tempo*)) (print *tempo*)) > 500 > 300 > 500