From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Using the same custom file in two different OSes
Date: Thu, 17 Jan 2013 19:48:51 +0200 [thread overview]
Message-ID: <83r4lj7la4.fsf@gnu.org> (raw)
In-Reply-To: <B631334DEB33487EA3B8F43E9CE29078@us.oracle.com>
> From: "Drew Adams" <drew.adams@oracle.com>
> Date: Thu, 17 Jan 2013 08:57:41 -0800
>
> > > `window-system' has the advantage that it works with older
> > > Emacs releases.
> >
> > Only if you want to support Emacs versions before 21.1.
>
> Fair enough. However, even in the final Emacs 22 release there are _many_ uses
> of `window-sytem' as a predicate in the Gnu Emacs source code, even though
> `display-graphic-p' was introduced two releases before that.
Old habits die hard.
> Heck, even in the latest Gnu Emacs development source code, to be Emacs 24.3,
> there are still many such "deprecated" uses, AFAICT.
>
> Here is a typical one, in dframe.el:
>
> ;; On a terminal, raise the frame or the user will
> ;; be confused.
> (if (not window-system)
> (select-frame (symbol-value frame-var)))
>
> In case you think dframe.el is a bit exotic, see the basic libraries faces.el
> and frame.el, where there are also several such uses.
We need a better QA, obviously. However, at the time, the core files
were left only with uses which couldn't be easily replaced by some
display-*-p predicate, and inventing a predicate for 1 or 2 uses is
not a good idea.
> And frame.el is the very file where `display-graphic-p' is *defined*. It is
> called only 3 times in that file, while `window-system' seems to be used there
> as a predicate 7 times.
I see only 5 instances, not 7, and it is not clear to me what
display-*-p predicate would be appropriate in their stead.
> Nobody's perfect, of course.
Emacs development certainly isn't.
next prev parent reply other threads:[~2013-01-17 17:48 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-13 22:00 Using the same custom file in two different OSes Dani Moncayo
2013-01-13 22:18 ` Drew Adams
2013-01-14 18:46 ` Dani Moncayo
2013-01-14 19:13 ` Drew Adams
2013-01-14 19:42 ` Dani Moncayo
2013-01-14 21:55 ` Peter Dyballa
2013-01-14 23:00 ` Dani Moncayo
2013-01-15 8:25 ` Didier Verna
2013-01-15 8:42 ` Dani Moncayo
2013-01-14 22:05 ` Drew Adams
2013-01-16 21:03 ` Dani Moncayo
[not found] ` <mailman.17633.1358371586.855.help-gnu-emacs@gnu.org>
2013-01-17 8:43 ` Sebastien Vauban
2013-01-17 14:19 ` Drew Adams
2013-01-17 14:38 ` Peter Dyballa
2013-01-17 15:22 ` Dani Moncayo
2013-01-17 16:38 ` Eli Zaretskii
2013-01-17 16:01 ` Drew Adams
2013-01-17 16:33 ` Eli Zaretskii
2013-01-17 16:32 ` Eli Zaretskii
2013-01-17 16:57 ` Drew Adams
2013-01-17 17:48 ` Eli Zaretskii [this message]
2013-01-17 18:15 ` Drew Adams
2013-01-17 18:44 ` Eli Zaretskii
2013-01-15 13:27 ` Stefan Monnier
2013-01-15 20:27 ` Dani Moncayo
[not found] ` <mailman.17532.1358281671.855.help-gnu-emacs@gnu.org>
2013-01-16 8:58 ` Sebastien Vauban
2013-01-16 20:35 ` Dani Moncayo
2013-01-16 12:59 ` Jason Rumney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83r4lj7la4.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).