3

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?

4

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
)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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