From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Using the same custom file in two different OSes Date: Thu, 17 Jan 2013 19:48:51 +0200 Message-ID: <83r4lj7la4.fsf@gnu.org> References: <419D9CDD3C2740E3B0E0CDE556F7BD12@us.oracle.com> <3F565B0F873C4BCCAA938FB0B136521E@us.oracle.com> <86libsb3o6.fsf@somewhere.org> <834nif93ed.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1358446270 7628 80.91.229.3 (17 Jan 2013 18:11:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jan 2013 18:11:10 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 17 19:11:29 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tvtaw-00088t-Gv for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Jan 2013 18:49:42 +0100 Original-Received: from localhost ([::1]:43922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvtaf-0004LA-U2 for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Jan 2013 12:49:25 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvtaX-0004K8-CW for help-gnu-emacs@gnu.org; Thu, 17 Jan 2013 12:49:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TvtaT-0004VM-BB for help-gnu-emacs@gnu.org; Thu, 17 Jan 2013 12:49:17 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:50989) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TvtaT-0004UK-3B for help-gnu-emacs@gnu.org; Thu, 17 Jan 2013 12:49:13 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MGS00F006P75R00@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Thu, 17 Jan 2013 19:48:46 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGS00FV86TA5E10@a-mtaout22.012.net.il> for help-gnu-emacs@gnu.org; Thu, 17 Jan 2013 19:48:46 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88683 Archived-At: > From: "Drew Adams" > 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.