emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/9] Refactor window-system configuration


From: Eli Zaretskii
Subject: Re: [PATCH 2/9] Refactor window-system configuration
Date: Tue, 07 Aug 2012 20:20:03 +0300

> Date: Tue, 07 Aug 2012 01:19:27 -0700
> From: Daniel Colascione <address@hidden>
> 
> 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 
> <http://www.gnu.org/licenses/>.  */
>  
>  #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.



reply via email to

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