+
+(defmacro with-component-last-block ((component block) &body body)
+ (let ((old-last-block (gensym "OLD-LAST-BLOCK")))
+ (once-only ((component component)
+ (block block))
+ `(let ((,old-last-block (component-last-block ,component)))
+ (unwind-protect
+ (progn (setf (component-last-block ,component)
+ ,block)
+ ,@body)
+ (setf (component-last-block ,component)
+ ,old-last-block))))))
+