From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: [PATCH 2/4] Refactor window-system configuration Date: Thu, 29 Dec 2011 17:21:09 -0500 Message-ID: References: <4b98eec4a5f68bfcd9233d5e7444de05873225b4.1325166472.git.dancol@dancol.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1325197281 7663 80.91.229.12 (29 Dec 2011 22:21:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 29 Dec 2011 22:21:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 29 23:21:17 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RgOLa-0008Ee-WA for ged-emacs-devel@m.gmane.org; Thu, 29 Dec 2011 23:21:15 +0100 Original-Received: from localhost ([::1]:57668 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgOLa-0005X8-D1 for ged-emacs-devel@m.gmane.org; Thu, 29 Dec 2011 17:21:14 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:44034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgOLX-0005Ws-VK for emacs-devel@gnu.org; Thu, 29 Dec 2011 17:21:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RgOLW-0003xA-DD for emacs-devel@gnu.org; Thu, 29 Dec 2011 17:21:11 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:36541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgOLW-0003x6-Bi for emacs-devel@gnu.org; Thu, 29 Dec 2011 17:21:10 -0500 Original-Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RgOLV-0008Lf-Rb; Thu, 29 Dec 2011 17:21:09 -0500 In-Reply-To: <4b98eec4a5f68bfcd9233d5e7444de05873225b4.1325166472.git.dancol@dancol.org> (Daniel Colascione's message of "Thu, 29 Dec 2011 06:03:20 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 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:147016 Archived-At: Daniel Colascione writes: > 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. > --- [snip > diff --git a/src/dispnew.c b/src/dispnew.c > index 2c0e74d..f13fc7a 100644 > --- a/src/dispnew.c > +++ b/src/dispnew.c > @@ -44,17 +44,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 */ We don't use something like "#include TERM_HEADER" in any other place, it you really want to consolidate this stuff, creating a new header file to include seems better. Also "TERM" does not look like a good prefix in this case, it's meaning might be confused with the TERM environment variable (nsterm/w32term/xterm are not that great either, but better not propagate the confusion).