How to detect is xemacs was opened with no window system

127 Views Asked by At

there are portions of my .emacs file that I would like to behave differently depending if emacs was opened in a terminal (ie, emacs -nw) or in a window. How does one go about detecting this?

1

There are 1 best solutions below

0
On BEST ANSWER

In my FSF .emacs, I have code like this:

(if (null window-system)
    (global-set-key "\C-h" 'delete-backward-char))

It looks like this works under XEmacs as well, though the preferred XEmacs way is to use the console-type function instead. Do M-x describe-function on console-type for details.