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

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

Re: How to find out if emacs is running inside GUI or terminal


From: Bob Proulx
Subject: Re: How to find out if emacs is running inside GUI or terminal
Date: Fri, 22 Nov 2013 12:30:25 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

Louis-Guillaume Gagnon wrote:
> Is there a way to find out within emacs if it is running in a GUI or inside
> a terminal (i.e. -nw switch specified on the cli)  using Elisp?
> 
> The reason is I would like to take different actions in my ~/.emacs
> depending on the situation.

Yes.  Use 'window-system' to determine this.  Example:

  (if window-system
      (setq mouse-yank-at-point t))

And to head off complaints about the example, it is only an example.
I am aware of 'fboundp'.

Bob



reply via email to

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