emacs-devel
[Top][All Lists]
Advanced

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

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


From: Dan Nicolaescu
Subject: Re: [PATCH 2/4] Refactor window-system configuration
Date: Thu, 29 Dec 2011 17:21:09 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Daniel Colascione <address@hidden> 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 
> <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 */

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).



reply via email to

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