[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: |
Sun, 24 Nov 2013 19:04:05 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Óscar Fuentes wrote:
> Bob Proulx writes:
> > (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'.
>
> I'll complain about something else, then :-)
:-)
> C-h v window-system
>
> [...]
>
> Use of this variable as a boolean is deprecated. Instead,
> use `display-graphic-p' or any of the other `display-*-p'
> predicates which report frame's specific UI-related capabilities.
Deprecated! I wish people would let the API mature and stabilize. I
hadn't heard of the display-graphic-p functions yet. Thanks for
mentioning them.
> So your example should be
>
> (if (display-graphic-p)
> ....
>
> There are several display-*-p functions for querying about specific
> features for a display.
Sure. Unless you happen to be using an older emacs that doesn't have
those newer functions. I will have to look to see how long they have
been around.
Bob
Re: How to find out if emacs is running inside GUI or terminal, Stefan Monnier, 2013/11/22