title: how to detect if emacs is running in a terminal or a window?
body: <p>I'm hoping to be able to branch on a flag in emacs to detect whether it is running in a terminal or a windowed app (i.e. the OS X Emacs app)</p>
  
  <p>Is there such a flag?</p>