use `display-graphic-p'