[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110474: Minor tweaks to recently-cha
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110474: Minor tweaks to recently-changed code. |
Date: |
Mon, 08 Oct 2012 15:14:39 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110474
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Mon 2012-10-08 15:14:39 -0700
message:
Minor tweaks to recently-changed code.
Space before paren, avoid overparenthesization, etc.
modified:
src/conf_post.h
src/emacs.c
src/image.c
src/keyboard.c
src/termhooks.h
=== modified file 'src/conf_post.h'
--- a/src/conf_post.h 2012-09-17 12:07:36 +0000
+++ b/src/conf_post.h 2012-10-08 22:14:39 +0000
@@ -142,19 +142,19 @@
#endif
#endif
-#if defined(HAVE_NTGUI) && !defined(DebPrint)
-# if defined(EMACSDEBUG)
+#if defined HAVE_NTGUI && !defined DebPrint
+# ifdef EMACSDEBUG
extern void _DebPrint (const char *fmt, ...);
# define DebPrint(stuff) _DebPrint stuff
# else
# define DebPrint(stuff)
-# endif /* EMACSDEBUG */
-#endif /* DebPrint */
+# endif
+#endif
-#if defined(CYGWIN) && defined(HAVE_NTGUI)
-#define NTGUI_UNICODE /* Cygwin runs only on UNICODE-supporting systems */
-#define _WIN32_WINNT 0x500 /* Win2k */
-#endif /* CYGWIN && HAVE_NTGUI */
+#if defined CYGWIN && defined HAVE_NTGUI
+# define NTGUI_UNICODE /* Cygwin runs only on UNICODE-supporting systems */
+# define _WIN32_WINNT 0x500 /* Win2k */
+#endif
#ifdef emacs /* Don't do this for lib-src. */
/* Tell regex.c to use a type compatible with Emacs. */
=== modified file 'src/emacs.c'
--- a/src/emacs.c 2012-10-08 12:53:18 +0000
+++ b/src/emacs.c 2012-10-08 22:14:39 +0000
@@ -34,18 +34,15 @@
#ifdef WINDOWSNT
#include <fcntl.h>
#include "w32.h"
-#endif
-
-#if defined (WINDOWSNT)
#include "w32heap.h"
#endif
-#if defined (WINDOWSNT) || defined (HAVE_NTGUI)
+#if defined WINDOWSNT || defined HAVE_NTGUI
#include "w32select.h"
#include "w32font.h"
#endif
-#if defined (HAVE_NTGUI) && defined (CYGWIN)
+#if defined HAVE_NTGUI && defined CYGWIN
#include "cygw32.h"
#endif
@@ -179,7 +176,7 @@
We mark being in the exec'd process by a daemon name argument of
form "--daemon=\nFD0,FD1\nNAME" where FD are the pipe file descriptors,
NAME is the original daemon name, if any. */
-#if defined (NS_IMPL_COCOA) || (defined (HAVE_NTGUI) && defined (CYGWIN))
+#if defined NS_IMPL_COCOA || (defined HAVE_NTGUI && defined CYGWIN)
# define DAEMON_MUST_EXEC
#endif
@@ -698,7 +695,7 @@
char *dname_arg = 0;
#ifdef DAEMON_MUST_EXEC
char dname_arg2[80];
-#endif /* DAEMON_MUST_EXEC */
+#endif
char *ch_to_dir;
#if GC_MARK_STACK
@@ -1378,9 +1375,9 @@
#ifdef WINDOWSNT
syms_of_ntproc ();
#endif /* WINDOWSNT */
-#if defined (CYGWIN) && defined (HAVE_NTGUI)
+#if defined CYGWIN && defined HAVE_NTGUI
syms_of_cygw32 ();
-#endif /* defined(CYGWIN) && defined (HAVE_NTGUI) */
+#endif
syms_of_window ();
syms_of_xdisp ();
syms_of_font ();
@@ -1415,9 +1412,9 @@
syms_of_fontset ();
#endif /* HAVE_NTGUI */
-#if defined (WINDOWSNT) || defined (HAVE_NTGUI)
+#if defined WINDOWSNT || defined HAVE_NTGUI
syms_of_w32select ();
-#endif /* WINDOWSNT || HAVE_NTGUI */
+#endif
#ifdef MSDOS
syms_of_xmenu ();
@@ -1465,10 +1462,9 @@
globals_of_w32menu ();
#endif /* HAVE_NTGUI */
-#if defined (WINDOWSNT) || defined (HAVE_NTGUI)
+#if defined WINDOWSNT || defined HAVE_NTGUI
globals_of_w32select ();
-#endif /* WINDOWSNT || HAVE_NTGUI */
-
+#endif
}
init_charset ();
=== modified file 'src/image.c'
--- a/src/image.c 2012-10-08 10:26:10 +0000
+++ b/src/image.c 2012-10-08 22:14:39 +0000
@@ -75,11 +75,12 @@
#endif /* HAVE_X_WINDOWS */
#ifdef HAVE_NTGUI
-# ifdef WINDOWSNT
-/* We only need (or want) w32.h when we're _not_
- * compiling for Cygwin */
+
+/* We need (or want) w32.h only when we're _not_ compiling for Cygwin. */
+#ifdef WINDOWSNT
# include "w32.h"
-# endif /* WINDOWSNT */
+#endif
+
/* W32_TODO : Color tables on W32. */
#undef COLOR_TABLE_SUPPORT
@@ -571,7 +572,7 @@
do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while
(0)
#else
#define CACHE_IMAGE_TYPE(type, status)
-#endif /* WINDOWSNT */
+#endif
#define ADD_IMAGE_TYPE(type) \
do { Vimage_types = Fcons (type, Vimage_types); } while (0)
@@ -594,7 +595,7 @@
if (type->init)
{
-#if defined (HAVE_NTGUI) && defined (WINDOWSNT)
+#if defined HAVE_NTGUI && defined WINDOWSNT
/* If we failed to load the library before, don't try again. */
Lisp_Object tested = Fassq (target_type, Vlibrary_cache);
if (CONSP (tested) && NILP (XCDR (tested)))
@@ -3013,7 +3014,7 @@
{":background", IMAGE_STRING_OR_NIL_VALUE, 0}
};
-#if defined(HAVE_NTGUI) && defined(WINDOWSNT)
+#if defined HAVE_NTGUI && defined WINDOWSNT
static bool init_xpm_functions (void);
#else
#define init_xpm_functions NULL
@@ -3240,7 +3241,7 @@
#endif /* WINDOWSNT */
-#if defined (HAVE_NTGUI) && !defined (WINDOWSNT)
+#if defined HAVE_NTGUI && !defined WINDOWSNT
/* Glue for code below */
#define fn_XpmReadFileToImage XpmReadFileToImage
#define fn_XpmCreateImageFromBuffer XpmCreateImageFromBuffer
@@ -5352,7 +5353,7 @@
{":background", IMAGE_STRING_OR_NIL_VALUE, 0}
};
-#if defined(HAVE_NTGUI) && defined (WINDOWSNT)
+#if defined HAVE_NTGUI && defined WINDOWSNT
static bool init_png_functions (void);
#else
#define init_png_functions NULL
@@ -6011,7 +6012,7 @@
{":background", IMAGE_STRING_OR_NIL_VALUE, 0}
};
-#if defined(HAVE_NTGUI) && defined(WINDOWSNT)
+#if defined HAVE_NTGUI && defined WINDOWSNT
static bool init_jpeg_functions (void);
#else
#define init_jpeg_functions NULL
@@ -6075,7 +6076,7 @@
different name. This name, jpeg_boolean, remains in effect through
the rest of image.c.
*/
-#if defined (CYGWIN) && defined (HAVE_NTGUI)
+#if defined CYGWIN && defined HAVE_NTGUI
#define boolean jpeg_boolean
#endif
#include <jpeglib.h>
@@ -7071,7 +7072,7 @@
{":background", IMAGE_STRING_OR_NIL_VALUE, 0}
};
-#if defined(HAVE_NTGUI) && defined(WINDOWSNT)
+#if defined HAVE_NTGUI && defined WINDOWSNT
static bool init_gif_functions (void);
#else
#define init_gif_functions NULL
=== modified file 'src/keyboard.c'
--- a/src/keyboard.c 2012-10-07 22:31:58 +0000
+++ b/src/keyboard.c 2012-10-08 22:14:39 +0000
@@ -313,7 +313,7 @@
/* Symbols to denote kinds of events. */
static Lisp_Object Qfunction_key;
Lisp_Object Qmouse_click;
-#if defined (HAVE_NTGUI)
+#ifdef HAVE_NTGUI
Lisp_Object Qlanguage_change;
#endif
static Lisp_Object Qdrag_n_drop;
@@ -3947,7 +3947,7 @@
x_activate_menubar (XFRAME (event->frame_or_window));
}
#endif
-#if defined (HAVE_NTGUI)
+#ifdef HAVE_NTGUI
else if (event->kind == LANGUAGE_CHANGE_EVENT)
{
/* Make an event (language-change (FRAME CODEPAGE LANGUAGE-ID)). */
@@ -11394,7 +11394,7 @@
DEFSYM (Qconfig_changed_event, "config-changed-event");
DEFSYM (Qmenu_enable, "menu-enable");
-#if defined (HAVE_NTGUI)
+#ifdef HAVE_NTGUI
DEFSYM (Qlanguage_change, "language-change");
#endif
=== modified file 'src/termhooks.h'
--- a/src/termhooks.h 2012-10-07 22:31:58 +0000
+++ b/src/termhooks.h 2012-10-08 22:14:39 +0000
@@ -107,7 +107,7 @@
HORIZ_WHEEL_EVENT, /* A wheel event generated by a second
horizontal wheel that is present on some
mice. See WHEEL_EVENT. */
-#if defined (HAVE_NTGUI)
+#ifdef HAVE_NTGUI
LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is
generated when HAVE_NTGUI or on Mac OS
when the keyboard layout or input
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110474: Minor tweaks to recently-changed code.,
Paul Eggert <=