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?
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.