assert unrecord-window-buffer is defined before using it