I was wondering what to put in my .emacs file to have different settings depending on whether I run a normal emacs session or whether I run emacs in the terminal with emacs -nw?

link|improve this question

48% accept rate
feedback

1 Answer

up vote 3 down vote accepted

You can use the variable window-system-version to tell if you are on a terminal. If this variable is nil, then it is terminal mode.

Example .emacs:

(when window-system-version
  ;; setup for graphic environment
)
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.