(when (eq state 'edited) (error "Please commit or undo your changes before deleting %s" file))