[Top][All Lists]

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

RE: Using the same custom file in two different OSes

From: Drew Adams
Subject: RE: Using the same custom file in two different OSes
Date: Thu, 17 Jan 2013 08:01:17 -0800

> >>>  (if (display-graphic-p) ...
> >> 
> >> FYI, I'm using: (if window-system ...
> >> but that comes down to pretty much the same thing, it seems.
> > 
> > `window-system' has the advantage that it works with older 
> > Emacs releases.
> > 
> > But `display-graphic-p' is what is recommended for recent releases.
> > From the doc string of `window-system':
> > 
> > "Use of this function as a predicate is deprecated.  Instead,
> >  use `display-graphic-p' or any of the other `display-*-p'
> >  predicates which report frame's specific UI-related capabilities."
> This looks more like a regression than progress.

Feel free to report it: `M-x report-emacs-bug'.

I only relayed the message, as I understand it.

> The variable `window-system' at least returns a value 
> indicating on which kind of graphic display this instance of 
> GNU Emacs runs: x, w32, ns, pc, mac. These variants still 
> need different set-ups. And it also makes sense to decorate 
> the instance running in different colours to see at once in 
> which variant I'm in.
> In future one might need to parse the text returned by 
> `emacs-version' to find this information - and might fail at 
> first because being build for a graphic display does not 
> exclude its use without a windowing system. So one would need 
> a second test.

AFAIK, `window-system' is _not_ deprecated.  It is its "use as a predicate" that
is deprecated.

IOW, Emacs Dev suggests that people use `display-graphic-p', not
`window-system', to determine whether the current Emacs session supports a
graphic display.

Again though, that's just my understanding, and I'm just relaying what I have

reply via email to

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