help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detect if Emacs is running in -nw mode


From: Barry Margolin
Subject: Re: Detect if Emacs is running in -nw mode
Date: Sun, 30 Mar 2008 22:18:57 -0400
User-agent: MT-NewsWatcher/3.5.3b2 (Intel Mac OS X)

In article <m34papoxpo.fsf@tfkp07.physik.uni-erlangen.de>,
 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> wrote:

> Christian Herenz <herenz@physik.hu-berlin.de> writes:
> > Is there something when NOT, so that I could set
> > [PSEUDO-CODE]:
> > (when not (window-system)
> >     (menu-bar-mode nil)
> >     (other commands i want to use when not windowed))
> 
> You can test whether the DISPLAY environment variable is set using
> 
> (getenv "DISPLAY")
> 
> In this way you can distinguish between emacs -nw running in an X
> or a "pure tty" environment. Is that what you want?

There are other window systems besides X.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]