From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH 2/9] Refactor window-system configuration Date: Tue, 07 Aug 2012 20:20:03 +0300 Message-ID: <83sjbyfwl8.fsf@gnu.org> References: <90cb636afa8a83b8f35bf97ede9cf567fd9c31a8.1344326992.git.dancol@dancol.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1344360045 10298 80.91.229.3 (7 Aug 2012 17:20:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Aug 2012 17:20:45 +0000 (UTC) Cc: emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 07 19:20:46 2012 Return-path: Envelope-to: ged-emacs-devel@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 1SynSW-0006Ss-PM for ged-emacs-devel@m.gmane.org; Tue, 07 Aug 2012 19:20:44 +0200 Original-Received: from localhost ([::1]:51775 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SynSV-0003LE-Oq for ged-emacs-devel@m.gmane.org; Tue, 07 Aug 2012 13:20:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SynSQ-0003L0-Df for emacs-devel@gnu.org; Tue, 07 Aug 2012 13:20:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SynSM-00057y-Vg for emacs-devel@gnu.org; Tue, 07 Aug 2012 13:20:38 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:62979) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SynSM-00057V-NN for emacs-devel@gnu.org; Tue, 07 Aug 2012 13:20:34 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0M8E00500ASHFG00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Tue, 07 Aug 2012 20:20:03 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M8E005DFATF9A90@a-mtaout21.012.net.il>; Tue, 07 Aug 2012 20:20:03 +0300 (IDT) In-reply-to: <90cb636afa8a83b8f35bf97ede9cf567fd9c31a8.1344326992.git.dancol@dancol.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:152268 Archived-At: > Date: Tue, 07 Aug 2012 01:19:27 -0700 > From: Daniel Colascione > > This change streamlines the window system selection code in > configure.in and moves many common function declarations from > window-specific headers to frame.h. It introduces a new TERM_HEADER > macro in config.h: we set this macro to the right header to use for > the window system for which we're compiling Emacs and have source > files include it indirectly. This way, we don't have to teach every > file about every window system. A general comment on this refactoring: the current code does not necessarily assume that a build must have only one type of window system. Your refactoring forces that. Here's an example: > --- a/src/dispnew.c > +++ b/src/dispnew.c > @@ -48,17 +48,9 @@ along with GNU Emacs. If not, see . */ > > #include "syssignal.h" > > -#ifdef HAVE_X_WINDOWS > -#include "xterm.h" > -#endif /* HAVE_X_WINDOWS */ > - > -#ifdef HAVE_NTGUI > -#include "w32term.h" > -#endif /* HAVE_NTGUI */ > - > -#ifdef HAVE_NS > -#include "nsterm.h" > -#endif > +#ifdef HAVE_WINDOW_SYSTEM > +#include TERM_HEADER > +#endif /* HAVE_WINDOW_SYSTEM */ The current code could well enough use all 3 of the headers. Your new code precludes that. (Yes, I know that currently including more than one means trouble, because there will be conflicting declarations. But still, your change sets one more obstacle to the long-term goal of allowing several different frame types in the same session.) I'd like Stefan's and Chong's opinion on this before delving into the details of this changeset.