aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2012-10-08 15:14:39 -0700
committerPaul Eggert2012-10-08 15:14:39 -0700
commita9e7a9d5430ba48645cc475c101a26b6531acfd6 (patch)
tree5c7179175ee1a7338ebdea7677fbb9206f8fa8a8 /src
parent51867ae22506264c0893b5e1a9ec7967157b6d96 (diff)
downloademacs-a9e7a9d5430ba48645cc475c101a26b6531acfd6.tar.gz
emacs-a9e7a9d5430ba48645cc475c101a26b6531acfd6.zip
Minor tweaks to recently-changed code.
Space before paren, avoid overparenthesization, etc.
Diffstat (limited to 'src')
-rw-r--r--src/conf_post.h16
-rw-r--r--src/emacs.c24
-rw-r--r--src/image.c25
-rw-r--r--src/keyboard.c6
-rw-r--r--src/termhooks.h2
5 files changed, 35 insertions, 38 deletions
diff --git a/src/conf_post.h b/src/conf_post.h
index 53fc941f464..aa008107ba6 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -142,19 +142,19 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
142#endif 142#endif
143#endif 143#endif
144 144
145#if defined(HAVE_NTGUI) && !defined(DebPrint) 145#if defined HAVE_NTGUI && !defined DebPrint
146# if defined(EMACSDEBUG) 146# ifdef EMACSDEBUG
147extern void _DebPrint (const char *fmt, ...); 147extern void _DebPrint (const char *fmt, ...);
148# define DebPrint(stuff) _DebPrint stuff 148# define DebPrint(stuff) _DebPrint stuff
149# else 149# else
150# define DebPrint(stuff) 150# define DebPrint(stuff)
151# endif /* EMACSDEBUG */ 151# endif
152#endif /* DebPrint */ 152#endif
153 153
154#if defined(CYGWIN) && defined(HAVE_NTGUI) 154#if defined CYGWIN && defined HAVE_NTGUI
155#define NTGUI_UNICODE /* Cygwin runs only on UNICODE-supporting systems */ 155# define NTGUI_UNICODE /* Cygwin runs only on UNICODE-supporting systems */
156#define _WIN32_WINNT 0x500 /* Win2k */ 156# define _WIN32_WINNT 0x500 /* Win2k */
157#endif /* CYGWIN && HAVE_NTGUI */ 157#endif
158 158
159#ifdef emacs /* Don't do this for lib-src. */ 159#ifdef emacs /* Don't do this for lib-src. */
160/* Tell regex.c to use a type compatible with Emacs. */ 160/* Tell regex.c to use a type compatible with Emacs. */
diff --git a/src/emacs.c b/src/emacs.c
index 203514fe204..0a2a60bee0c 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -34,18 +34,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
34#ifdef WINDOWSNT 34#ifdef WINDOWSNT
35#include <fcntl.h> 35#include <fcntl.h>
36#include "w32.h" 36#include "w32.h"
37#endif
38
39#if defined (WINDOWSNT)
40#include "w32heap.h" 37#include "w32heap.h"
41#endif 38#endif
42 39
43#if defined (WINDOWSNT) || defined (HAVE_NTGUI) 40#if defined WINDOWSNT || defined HAVE_NTGUI
44#include "w32select.h" 41#include "w32select.h"
45#include "w32font.h" 42#include "w32font.h"
46#endif 43#endif
47 44
48#if defined (HAVE_NTGUI) && defined (CYGWIN) 45#if defined HAVE_NTGUI && defined CYGWIN
49#include "cygw32.h" 46#include "cygw32.h"
50#endif 47#endif
51 48
@@ -179,7 +176,7 @@ static uprintmax_t heap_bss_diff;
179 We mark being in the exec'd process by a daemon name argument of 176 We mark being in the exec'd process by a daemon name argument of
180 form "--daemon=\nFD0,FD1\nNAME" where FD are the pipe file descriptors, 177 form "--daemon=\nFD0,FD1\nNAME" where FD are the pipe file descriptors,
181 NAME is the original daemon name, if any. */ 178 NAME is the original daemon name, if any. */
182#if defined (NS_IMPL_COCOA) || (defined (HAVE_NTGUI) && defined (CYGWIN)) 179#if defined NS_IMPL_COCOA || (defined HAVE_NTGUI && defined CYGWIN)
183# define DAEMON_MUST_EXEC 180# define DAEMON_MUST_EXEC
184#endif 181#endif
185 182
@@ -698,7 +695,7 @@ main (int argc, char **argv)
698 char *dname_arg = 0; 695 char *dname_arg = 0;
699#ifdef DAEMON_MUST_EXEC 696#ifdef DAEMON_MUST_EXEC
700 char dname_arg2[80]; 697 char dname_arg2[80];
701#endif /* DAEMON_MUST_EXEC */ 698#endif
702 char *ch_to_dir; 699 char *ch_to_dir;
703 700
704#if GC_MARK_STACK 701#if GC_MARK_STACK
@@ -1378,9 +1375,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1378#ifdef WINDOWSNT 1375#ifdef WINDOWSNT
1379 syms_of_ntproc (); 1376 syms_of_ntproc ();
1380#endif /* WINDOWSNT */ 1377#endif /* WINDOWSNT */
1381#if defined (CYGWIN) && defined (HAVE_NTGUI) 1378#if defined CYGWIN && defined HAVE_NTGUI
1382 syms_of_cygw32 (); 1379 syms_of_cygw32 ();
1383#endif /* defined(CYGWIN) && defined (HAVE_NTGUI) */ 1380#endif
1384 syms_of_window (); 1381 syms_of_window ();
1385 syms_of_xdisp (); 1382 syms_of_xdisp ();
1386 syms_of_font (); 1383 syms_of_font ();
@@ -1415,9 +1412,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1415 syms_of_fontset (); 1412 syms_of_fontset ();
1416#endif /* HAVE_NTGUI */ 1413#endif /* HAVE_NTGUI */
1417 1414
1418#if defined (WINDOWSNT) || defined (HAVE_NTGUI) 1415#if defined WINDOWSNT || defined HAVE_NTGUI
1419 syms_of_w32select (); 1416 syms_of_w32select ();
1420#endif /* WINDOWSNT || HAVE_NTGUI */ 1417#endif
1421 1418
1422#ifdef MSDOS 1419#ifdef MSDOS
1423 syms_of_xmenu (); 1420 syms_of_xmenu ();
@@ -1465,10 +1462,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1465 globals_of_w32menu (); 1462 globals_of_w32menu ();
1466#endif /* HAVE_NTGUI */ 1463#endif /* HAVE_NTGUI */
1467 1464
1468#if defined (WINDOWSNT) || defined (HAVE_NTGUI) 1465#if defined WINDOWSNT || defined HAVE_NTGUI
1469 globals_of_w32select (); 1466 globals_of_w32select ();
1470#endif /* WINDOWSNT || HAVE_NTGUI */ 1467#endif
1471
1472 } 1468 }
1473 1469
1474 init_charset (); 1470 init_charset ();
diff --git a/src/image.c b/src/image.c
index 6058bdf444c..9b41cf74993 100644
--- a/src/image.c
+++ b/src/image.c
@@ -75,11 +75,12 @@ typedef struct x_bitmap_record Bitmap_Record;
75#endif /* HAVE_X_WINDOWS */ 75#endif /* HAVE_X_WINDOWS */
76 76
77#ifdef HAVE_NTGUI 77#ifdef HAVE_NTGUI
78# ifdef WINDOWSNT 78
79/* We only need (or want) w32.h when we're _not_ 79/* We need (or want) w32.h only when we're _not_ compiling for Cygwin. */
80 * compiling for Cygwin */ 80#ifdef WINDOWSNT
81# include "w32.h" 81# include "w32.h"
82# endif /* WINDOWSNT */ 82#endif
83
83/* W32_TODO : Color tables on W32. */ 84/* W32_TODO : Color tables on W32. */
84#undef COLOR_TABLE_SUPPORT 85#undef COLOR_TABLE_SUPPORT
85 86
@@ -571,7 +572,7 @@ extern Lisp_Object Vlibrary_cache;
571 do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0) 572 do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0)
572#else 573#else
573#define CACHE_IMAGE_TYPE(type, status) 574#define CACHE_IMAGE_TYPE(type, status)
574#endif /* WINDOWSNT */ 575#endif
575 576
576#define ADD_IMAGE_TYPE(type) \ 577#define ADD_IMAGE_TYPE(type) \
577 do { Vimage_types = Fcons (type, Vimage_types); } while (0) 578 do { Vimage_types = Fcons (type, Vimage_types); } while (0)
@@ -594,7 +595,7 @@ define_image_type (struct image_type *type)
594 595
595 if (type->init) 596 if (type->init)
596 { 597 {
597#if defined (HAVE_NTGUI) && defined (WINDOWSNT) 598#if defined HAVE_NTGUI && defined WINDOWSNT
598 /* If we failed to load the library before, don't try again. */ 599 /* If we failed to load the library before, don't try again. */
599 Lisp_Object tested = Fassq (target_type, Vlibrary_cache); 600 Lisp_Object tested = Fassq (target_type, Vlibrary_cache);
600 if (CONSP (tested) && NILP (XCDR (tested))) 601 if (CONSP (tested) && NILP (XCDR (tested)))
@@ -3013,7 +3014,7 @@ static const struct image_keyword xpm_format[XPM_LAST] =
3013 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 3014 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
3014}; 3015};
3015 3016
3016#if defined(HAVE_NTGUI) && defined(WINDOWSNT) 3017#if defined HAVE_NTGUI && defined WINDOWSNT
3017static bool init_xpm_functions (void); 3018static bool init_xpm_functions (void);
3018#else 3019#else
3019#define init_xpm_functions NULL 3020#define init_xpm_functions NULL
@@ -3240,7 +3241,7 @@ init_xpm_functions (void)
3240 3241
3241#endif /* WINDOWSNT */ 3242#endif /* WINDOWSNT */
3242 3243
3243#if defined (HAVE_NTGUI) && !defined (WINDOWSNT) 3244#if defined HAVE_NTGUI && !defined WINDOWSNT
3244/* Glue for code below */ 3245/* Glue for code below */
3245#define fn_XpmReadFileToImage XpmReadFileToImage 3246#define fn_XpmReadFileToImage XpmReadFileToImage
3246#define fn_XpmCreateImageFromBuffer XpmCreateImageFromBuffer 3247#define fn_XpmCreateImageFromBuffer XpmCreateImageFromBuffer
@@ -5352,7 +5353,7 @@ static const struct image_keyword png_format[PNG_LAST] =
5352 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 5353 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
5353}; 5354};
5354 5355
5355#if defined(HAVE_NTGUI) && defined (WINDOWSNT) 5356#if defined HAVE_NTGUI && defined WINDOWSNT
5356static bool init_png_functions (void); 5357static bool init_png_functions (void);
5357#else 5358#else
5358#define init_png_functions NULL 5359#define init_png_functions NULL
@@ -6011,7 +6012,7 @@ static const struct image_keyword jpeg_format[JPEG_LAST] =
6011 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 6012 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
6012}; 6013};
6013 6014
6014#if defined(HAVE_NTGUI) && defined(WINDOWSNT) 6015#if defined HAVE_NTGUI && defined WINDOWSNT
6015static bool init_jpeg_functions (void); 6016static bool init_jpeg_functions (void);
6016#else 6017#else
6017#define init_jpeg_functions NULL 6018#define init_jpeg_functions NULL
@@ -6075,7 +6076,7 @@ jpeg_image_p (Lisp_Object object)
6075 different name. This name, jpeg_boolean, remains in effect through 6076 different name. This name, jpeg_boolean, remains in effect through
6076 the rest of image.c. 6077 the rest of image.c.
6077*/ 6078*/
6078#if defined (CYGWIN) && defined (HAVE_NTGUI) 6079#if defined CYGWIN && defined HAVE_NTGUI
6079#define boolean jpeg_boolean 6080#define boolean jpeg_boolean
6080#endif 6081#endif
6081#include <jpeglib.h> 6082#include <jpeglib.h>
@@ -7071,7 +7072,7 @@ static const struct image_keyword gif_format[GIF_LAST] =
7071 {":background", IMAGE_STRING_OR_NIL_VALUE, 0} 7072 {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
7072}; 7073};
7073 7074
7074#if defined(HAVE_NTGUI) && defined(WINDOWSNT) 7075#if defined HAVE_NTGUI && defined WINDOWSNT
7075static bool init_gif_functions (void); 7076static bool init_gif_functions (void);
7076#else 7077#else
7077#define init_gif_functions NULL 7078#define init_gif_functions NULL
diff --git a/src/keyboard.c b/src/keyboard.c
index 05b9a9dde01..61481c5f0f6 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -313,7 +313,7 @@ static Lisp_Object Qmouse_fixup_help_message;
313/* Symbols to denote kinds of events. */ 313/* Symbols to denote kinds of events. */
314static Lisp_Object Qfunction_key; 314static Lisp_Object Qfunction_key;
315Lisp_Object Qmouse_click; 315Lisp_Object Qmouse_click;
316#if defined (HAVE_NTGUI) 316#ifdef HAVE_NTGUI
317Lisp_Object Qlanguage_change; 317Lisp_Object Qlanguage_change;
318#endif 318#endif
319static Lisp_Object Qdrag_n_drop; 319static Lisp_Object Qdrag_n_drop;
@@ -3947,7 +3947,7 @@ kbd_buffer_get_event (KBOARD **kbp,
3947 x_activate_menubar (XFRAME (event->frame_or_window)); 3947 x_activate_menubar (XFRAME (event->frame_or_window));
3948 } 3948 }
3949#endif 3949#endif
3950#if defined (HAVE_NTGUI) 3950#ifdef HAVE_NTGUI
3951 else if (event->kind == LANGUAGE_CHANGE_EVENT) 3951 else if (event->kind == LANGUAGE_CHANGE_EVENT)
3952 { 3952 {
3953 /* Make an event (language-change (FRAME CODEPAGE LANGUAGE-ID)). */ 3953 /* Make an event (language-change (FRAME CODEPAGE LANGUAGE-ID)). */
@@ -11394,7 +11394,7 @@ syms_of_keyboard (void)
11394 DEFSYM (Qconfig_changed_event, "config-changed-event"); 11394 DEFSYM (Qconfig_changed_event, "config-changed-event");
11395 DEFSYM (Qmenu_enable, "menu-enable"); 11395 DEFSYM (Qmenu_enable, "menu-enable");
11396 11396
11397#if defined (HAVE_NTGUI) 11397#ifdef HAVE_NTGUI
11398 DEFSYM (Qlanguage_change, "language-change"); 11398 DEFSYM (Qlanguage_change, "language-change");
11399#endif 11399#endif
11400 11400
diff --git a/src/termhooks.h b/src/termhooks.h
index 42f2e16e577..c33c2dd1587 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -107,7 +107,7 @@ enum event_kind
107 HORIZ_WHEEL_EVENT, /* A wheel event generated by a second 107 HORIZ_WHEEL_EVENT, /* A wheel event generated by a second
108 horizontal wheel that is present on some 108 horizontal wheel that is present on some
109 mice. See WHEEL_EVENT. */ 109 mice. See WHEEL_EVENT. */
110#if defined (HAVE_NTGUI) 110#ifdef HAVE_NTGUI
111 LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is 111 LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is
112 generated when HAVE_NTGUI or on Mac OS 112 generated when HAVE_NTGUI or on Mac OS
113 when the keyboard layout or input 113 when the keyboard layout or input