I have some items in my .emacs that I don't want to run if I ran emacs -nw
. How can I tell in elisp if that is the case?
(edited to change -nox to -nw --- where was my brain?)
I have some items in my .emacs that I don't want to run if I ran emacs -nw
. How can I tell in elisp if that is the case?
(edited to change -nox to -nw --- where was my brain?)
I think I found my own answer:
(when window-system
(foo))
will only foo when I'm running in X.
Your answer above is correct, although if you want to differentiate between other window systems and only want to run the code if you are actualyl using X, you'd have to go
(if (eq window-system 'X) (foo))