aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-03-17 09:32:03 -0700
committerPaul Eggert2011-03-17 09:32:03 -0700
commitb1d876f1a19ae65c8a8dd61c4ce17055ca53f16c (patch)
tree5dd8a40d7e3e0b86749cecfee7443ad81bdbfe5e /src
parentb766f86726fc2828a035cb8db149598a3a84de96 (diff)
parentd6cd56f187a791983579bf5d4ce3702d2ddf2499 (diff)
downloademacs-b1d876f1a19ae65c8a8dd61c4ce17055ca53f16c.tar.gz
emacs-b1d876f1a19ae65c8a8dd61c4ce17055ca53f16c.zip
Merge from mainline.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog56
-rw-r--r--src/buffer.c4
-rw-r--r--src/coding.c159
-rw-r--r--src/emacs.c12
-rw-r--r--src/keyboard.h4
-rw-r--r--src/lisp.h2
-rw-r--r--src/print.c24
-rw-r--r--src/w32.c5
-rw-r--r--src/w32console.c9
-rw-r--r--src/w32fns.c15
-rw-r--r--src/w32font.c3
-rw-r--r--src/w32inevt.c9
-rw-r--r--src/w32menu.c8
-rw-r--r--src/w32proc.c8
-rw-r--r--src/w32select.c2
-rw-r--r--src/w32term.c14
-rw-r--r--src/w32term.h6
-rw-r--r--src/w32uniscribe.c4
18 files changed, 166 insertions, 178 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2b7d5289e67..7243eb23527 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -26,8 +26,6 @@
26 26
27 * deps.mk (unexalpha.o): Remove; unused. 27 * deps.mk (unexalpha.o): Remove; unused.
28 28
292011-03-16 Paul Eggert <eggert@cs.ucla.edu>
30
31 New file unexec.h, the (simple) interface for unexec (Bug#8267). 29 New file unexec.h, the (simple) interface for unexec (Bug#8267).
32 * unexec.h: New file. 30 * unexec.h: New file.
33 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o): 31 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
@@ -98,8 +96,6 @@
98 Rename or remove local vars to avoid shadowing. 96 Rename or remove local vars to avoid shadowing.
99 (Ftranslate_region_internal): Mark var as initialized. 97 (Ftranslate_region_internal): Mark var as initialized.
100 98
1012011-03-15 Paul Eggert <eggert@cs.ucla.edu>
102
103 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to 99 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
104 avoid shadowing. 100 avoid shadowing.
105 101
@@ -249,10 +245,7 @@
249 (fix_start_end_in_overlays): Likewise. This function should be 245 (fix_start_end_in_overlays): Likewise. This function should be
250 simplified by using pointers-to-pointers, but that's a different 246 simplified by using pointers-to-pointers, but that's a different
251 matter. 247 matter.
252 248 (switch_to_buffer_1): Now static.
2532011-03-14 Paul Eggert <eggert@cs.ucla.edu>
254
255 * buffer.c (switch_to_buffer_1): Now static.
256 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte): 249 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
257 (report_overlay_modification): Rename locals to avoid shadowing. 250 (report_overlay_modification): Rename locals to avoid shadowing.
258 251
@@ -317,6 +310,51 @@
317 if GCC considers string literals to be constants. 310 if GCC considers string literals to be constants.
318 (Fdbus_register_service, Fdbus_register_method): Remove unused vars. 311 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
319 312
3132011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
314
315 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
316 (print_preprocess, print_object): New macro to fix last change.
317
318 * print.c (print_preprocess): Don't forget font objects.
319
3202011-03-16 Juanma Barranquero <lekktu@gmail.com>
321
322 * emacs.c (USAGE3): Doc fixes.
323
3242011-03-15 Andreas Schwab <schwab@linux-m68k.org>
325
326 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
327 structure.
328
3292011-03-14 Juanma Barranquero <lekktu@gmail.com>
330
331 * lisp.h (VWindow_system, Qfile_name_history):
332 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
333 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
334 (w32_system_caret_x, w32_system_caret_y): Declare extern.
335
336 * w32select.c: Don't #include "keyboard.h".
337 (run_protected): Add extern declaration for waiting_for_input.
338
339 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
340 * w32console.c (detect_input_pending, read_input_pending)
341 (encode_terminal_code):
342 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
343 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
344 (w32_system_caret_y, Qfile_name_history):
345 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
346 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
347 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
348 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
349 * w32proc.c (Qlocal, report_file_error):
350 * w32term.c (Vwindow_system, updating_frame):
351 * w32uniscribe.c (initialized, uniscribe_font_driver):
352 Remove unneeded extern declarations.
353
3542011-03-14 Chong Yidong <cyd@stupidchicken.com>
355
356 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
357
3202011-03-13 Chong Yidong <cyd@stupidchicken.com> 3582011-03-13 Chong Yidong <cyd@stupidchicken.com>
321 359
322 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT) 360 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
@@ -420,7 +458,7 @@
420 458
4212011-03-12 Eli Zaretskii <eliz@gnu.org> 4592011-03-12 Eli Zaretskii <eliz@gnu.org>
422 460
423 * termcap.c [MSDOS]: Include "msdos.h. 461 * termcap.c [MSDOS]: Include "msdos.h".
424 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent): 462 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
425 Constify `char *' arguments and their references according to 463 Constify `char *' arguments and their references according to
426 prototypes in tparam.h. 464 prototypes in tparam.h.
diff --git a/src/buffer.c b/src/buffer.c
index b718bf3e576..c0e6866dee1 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -611,8 +611,8 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
611 /* Make sure the base buffer has markers for its narrowing. */ 611 /* Make sure the base buffer has markers for its narrowing. */
612 if (NILP (BVAR (b->base_buffer, pt_marker))) 612 if (NILP (BVAR (b->base_buffer, pt_marker)))
613 { 613 {
614 eassert (NILP (BVAR (b, begv_marker))); 614 eassert (NILP (BVAR (b->base_buffer, begv_marker)));
615 eassert (NILP (BVAR (b, zv_marker))); 615 eassert (NILP (BVAR (b->base_buffer, zv_marker)));
616 616
617 BVAR (b->base_buffer, pt_marker) = Fmake_marker (); 617 BVAR (b->base_buffer, pt_marker) = Fmake_marker ();
618 set_marker_both (BVAR (b->base_buffer, pt_marker), base_buffer, 618 set_marker_both (BVAR (b->base_buffer, pt_marker), base_buffer,
diff --git a/src/coding.c b/src/coding.c
index 9a6a4484e50..0c2836c19f6 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -2954,12 +2954,7 @@ detect_coding_iso_2022 (struct coding_system *coding,
2954 const unsigned char *src_end = coding->source + coding->src_bytes; 2954 const unsigned char *src_end = coding->source + coding->src_bytes;
2955 int multibytep = coding->src_multibyte; 2955 int multibytep = coding->src_multibyte;
2956 int single_shifting = 0; 2956 int single_shifting = 0;
2957 2957 int id;
2958 /* FIXME: Does ID need to be initialized here? The "End of composition"
2959 code below does not initialize ID even though ID is used
2960 afterwards, and perhaps that is a bug. */
2961 int id = 0;
2962
2963 int c, c1; 2958 int c, c1;
2964 int consumed_chars = 0; 2959 int consumed_chars = 0;
2965 int i; 2960 int i;
@@ -2999,40 +2994,11 @@ detect_coding_iso_2022 (struct coding_system *coding,
2999 break; 2994 break;
3000 single_shifting = 0; 2995 single_shifting = 0;
3001 ONE_MORE_BYTE (c); 2996 ONE_MORE_BYTE (c);
3002 if (c >= '(' && c <= '/') 2997 if (c == 'N' || c == 'O')
3003 {
3004 /* Designation sequence for a charset of dimension 1. */
3005 ONE_MORE_BYTE (c1);
3006 if (c1 < ' ' || c1 >= 0x80
3007 || (id = iso_charset_table[0][c >= ','][c1]) < 0)
3008 /* Invalid designation sequence. Just ignore. */
3009 break;
3010 }
3011 else if (c == '$')
3012 {
3013 /* Designation sequence for a charset of dimension 2. */
3014 ONE_MORE_BYTE (c);
3015 if (c >= '@' && c <= 'B')
3016 /* Designation for JISX0208.1978, GB2312, or JISX0208. */
3017 id = iso_charset_table[1][0][c];
3018 else if (c >= '(' && c <= '/')
3019 {
3020 ONE_MORE_BYTE (c1);
3021 if (c1 < ' ' || c1 >= 0x80
3022 || (id = iso_charset_table[1][c >= ','][c1]) < 0)
3023 /* Invalid designation sequence. Just ignore. */
3024 break;
3025 }
3026 else
3027 /* Invalid designation sequence. Just ignore it. */
3028 break;
3029 }
3030 else if (c == 'N' || c == 'O')
3031 { 2998 {
3032 /* ESC <Fe> for SS2 or SS3. */ 2999 /* ESC <Fe> for SS2 or SS3. */
3033 single_shifting = 1; 3000 single_shifting = 1;
3034 rejected |= CATEGORY_MASK_ISO_7BIT | CATEGORY_MASK_ISO_8BIT; 3001 rejected |= CATEGORY_MASK_ISO_7BIT | CATEGORY_MASK_ISO_8BIT;
3035 break;
3036 } 3002 }
3037 else if (c == '1') 3003 else if (c == '1')
3038 { 3004 {
@@ -3048,36 +3014,66 @@ detect_coding_iso_2022 (struct coding_system *coding,
3048 { 3014 {
3049 /* ESC <Fp> for start/end composition. */ 3015 /* ESC <Fp> for start/end composition. */
3050 composition_count = 0; 3016 composition_count = 0;
3051 break;
3052 } 3017 }
3053 else 3018 else
3054 { 3019 {
3055 /* Invalid escape sequence. Just ignore it. */ 3020 if (c >= '(' && c <= '/')
3056 break; 3021 {
3057 } 3022 /* Designation sequence for a charset of dimension 1. */
3023 ONE_MORE_BYTE (c1);
3024 if (c1 < ' ' || c1 >= 0x80
3025 || (id = iso_charset_table[0][c >= ','][c1]) < 0)
3026 /* Invalid designation sequence. Just ignore. */
3027 break;
3028 }
3029 else if (c == '$')
3030 {
3031 /* Designation sequence for a charset of dimension 2. */
3032 ONE_MORE_BYTE (c);
3033 if (c >= '@' && c <= 'B')
3034 /* Designation for JISX0208.1978, GB2312, or JISX0208. */
3035 id = iso_charset_table[1][0][c];
3036 else if (c >= '(' && c <= '/')
3037 {
3038 ONE_MORE_BYTE (c1);
3039 if (c1 < ' ' || c1 >= 0x80
3040 || (id = iso_charset_table[1][c >= ','][c1]) < 0)
3041 /* Invalid designation sequence. Just ignore. */
3042 break;
3043 }
3044 else
3045 /* Invalid designation sequence. Just ignore it. */
3046 break;
3047 }
3048 else
3049 {
3050 /* Invalid escape sequence. Just ignore it. */
3051 break;
3052 }
3058 3053
3059 /* We found a valid designation sequence for CHARSET. */ 3054 /* We found a valid designation sequence for CHARSET. */
3060 rejected |= CATEGORY_MASK_ISO_8BIT; 3055 rejected |= CATEGORY_MASK_ISO_8BIT;
3061 if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7], 3056 if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7],
3062 id)) 3057 id))
3063 found |= CATEGORY_MASK_ISO_7; 3058 found |= CATEGORY_MASK_ISO_7;
3064 else 3059 else
3065 rejected |= CATEGORY_MASK_ISO_7; 3060 rejected |= CATEGORY_MASK_ISO_7;
3066 if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7_tight], 3061 if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7_tight],
3067 id)) 3062 id))
3068 found |= CATEGORY_MASK_ISO_7_TIGHT; 3063 found |= CATEGORY_MASK_ISO_7_TIGHT;
3069 else 3064 else
3070 rejected |= CATEGORY_MASK_ISO_7_TIGHT; 3065 rejected |= CATEGORY_MASK_ISO_7_TIGHT;
3071 if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7_else], 3066 if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7_else],
3072 id)) 3067 id))
3073 found |= CATEGORY_MASK_ISO_7_ELSE; 3068 found |= CATEGORY_MASK_ISO_7_ELSE;
3074 else 3069 else
3075 rejected |= CATEGORY_MASK_ISO_7_ELSE; 3070 rejected |= CATEGORY_MASK_ISO_7_ELSE;
3076 if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_8_else], 3071 if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_8_else],
3077 id)) 3072 id))
3078 found |= CATEGORY_MASK_ISO_8_ELSE; 3073 found |= CATEGORY_MASK_ISO_8_ELSE;
3079 else 3074 else
3080 rejected |= CATEGORY_MASK_ISO_8_ELSE; 3075 rejected |= CATEGORY_MASK_ISO_8_ELSE;
3076 }
3081 break; 3077 break;
3082 3078
3083 case ISO_CODE_SO: 3079 case ISO_CODE_SO:
@@ -3105,13 +3101,32 @@ detect_coding_iso_2022 (struct coding_system *coding,
3105 rejected |= CATEGORY_MASK_ISO_7BIT; 3101 rejected |= CATEGORY_MASK_ISO_7BIT;
3106 if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_1]) 3102 if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_1])
3107 & CODING_ISO_FLAG_SINGLE_SHIFT) 3103 & CODING_ISO_FLAG_SINGLE_SHIFT)
3108 found |= CATEGORY_MASK_ISO_8_1, single_shifting = 1; 3104 {
3105 found |= CATEGORY_MASK_ISO_8_1;
3106 single_shifting = 1;
3107 }
3109 if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_2]) 3108 if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_2])
3110 & CODING_ISO_FLAG_SINGLE_SHIFT) 3109 & CODING_ISO_FLAG_SINGLE_SHIFT)
3111 found |= CATEGORY_MASK_ISO_8_2, single_shifting = 1; 3110 {
3111 found |= CATEGORY_MASK_ISO_8_2;
3112 single_shifting = 1;
3113 }
3112 if (single_shifting) 3114 if (single_shifting)
3113 break; 3115 break;
3114 goto check_extra_latin; 3116 check_extra_latin:
3117 if (! VECTORP (Vlatin_extra_code_table)
3118 || NILP (XVECTOR (Vlatin_extra_code_table)->contents[c]))
3119 {
3120 rejected = CATEGORY_MASK_ISO;
3121 break;
3122 }
3123 if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_1])
3124 & CODING_ISO_FLAG_LATIN_EXTRA)
3125 found |= CATEGORY_MASK_ISO_8_1;
3126 else
3127 rejected |= CATEGORY_MASK_ISO_8_1;
3128 rejected |= CATEGORY_MASK_ISO_8_2;
3129 break;
3115 3130
3116 default: 3131 default:
3117 if (c < 0) 3132 if (c < 0)
@@ -3162,20 +3177,6 @@ detect_coding_iso_2022 (struct coding_system *coding,
3162 } 3177 }
3163 break; 3178 break;
3164 } 3179 }
3165 check_extra_latin:
3166 single_shifting = 0;
3167 if (! VECTORP (Vlatin_extra_code_table)
3168 || NILP (XVECTOR (Vlatin_extra_code_table)->contents[c]))
3169 {
3170 rejected = CATEGORY_MASK_ISO;
3171 break;
3172 }
3173 if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_1])
3174 & CODING_ISO_FLAG_LATIN_EXTRA)
3175 found |= CATEGORY_MASK_ISO_8_1;
3176 else
3177 rejected |= CATEGORY_MASK_ISO_8_1;
3178 rejected |= CATEGORY_MASK_ISO_8_2;
3179 } 3180 }
3180 } 3181 }
3181 detect_info->rejected |= CATEGORY_MASK_ISO; 3182 detect_info->rejected |= CATEGORY_MASK_ISO;
diff --git a/src/emacs.c b/src/emacs.c
index d30d42f1ee4..052f22ea622 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -141,7 +141,7 @@ Lisp_Object Qfile_name_handler_alist;
141 141
142Lisp_Object Qrisky_local_variable; 142Lisp_Object Qrisky_local_variable;
143 143
144/* If non-zero, emacs should not attempt to use a window-specific code, 144/* If non-zero, Emacs should not attempt to use a window-specific code,
145 but instead should use the virtual terminal under which it was started. */ 145 but instead should use the virtual terminal under which it was started. */
146int inhibit_window_system; 146int inhibit_window_system;
147 147
@@ -169,7 +169,6 @@ static unsigned long heap_bss_diff;
169#define MAX_HEAP_BSS_DIFF (1024*1024) 169#define MAX_HEAP_BSS_DIFF (1024*1024)
170 170
171/* Nonzero means running Emacs without interactive terminal. */ 171/* Nonzero means running Emacs without interactive terminal. */
172
173int noninteractive; 172int noninteractive;
174 173
175/* Nonzero means remove site-lisp directories from load-path. */ 174/* Nonzero means remove site-lisp directories from load-path. */
@@ -249,14 +248,14 @@ Display options:\n\
249--border-color, -bd COLOR main border color\n\ 248--border-color, -bd COLOR main border color\n\
250--border-width, -bw WIDTH width of main border\n\ 249--border-width, -bw WIDTH width of main border\n\
251--color, --color=MODE override color mode for character terminals;\n\ 250--color, --color=MODE override color mode for character terminals;\n\
252 MODE defaults to `auto', and can also\n\ 251 MODE defaults to `auto', and\n\
253 be `never', `auto', `always',\n\ 252 can also be `never', `always',\n\
254 or a mode name like `ansi8'\n\ 253 or a mode name like `ansi8'\n\
255--cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\ 254--cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\
256--font, -fn FONT default font; must be fixed-width\n\ 255--font, -fn FONT default font; must be fixed-width\n\
257--foreground-color, -fg COLOR window foreground color\n\ 256--foreground-color, -fg COLOR window foreground color\n\
258--fullheight, -fh make the first frame high as the screen\n\ 257--fullheight, -fh make the first frame high as the screen\n\
259--fullscreen, -fs make first frame fullscreen\n\ 258--fullscreen, -fs make the first frame fullscreen\n\
260--fullwidth, -fw make the first frame wide as the screen\n\ 259--fullwidth, -fw make the first frame wide as the screen\n\
261--maximized, -mm make the first frame maximized\n\ 260--maximized, -mm make the first frame maximized\n\
262--geometry, -g GEOMETRY window geometry\n\ 261--geometry, -g GEOMETRY window geometry\n\
@@ -577,7 +576,8 @@ DEFINE_DUMMY_FUNCTION (__main)
577 enough information to do it right. */ 576 enough information to do it right. */
578 577
579static int 578static int
580argmatch (char **argv, int argc, const char *sstr, const char *lstr, int minlen, char **valptr, int *skipptr) 579argmatch (char **argv, int argc, const char *sstr, const char *lstr,
580 int minlen, char **valptr, int *skipptr)
581{ 581{
582 char *p = NULL; 582 char *p = NULL;
583 int arglen; 583 int arglen;
diff --git a/src/keyboard.h b/src/keyboard.h
index 765979b3997..00745a09140 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -519,3 +519,7 @@ extern int tty_read_avail_input (struct terminal *, int,
519 struct input_event *); 519 struct input_event *);
520extern EMACS_TIME timer_check (int); 520extern EMACS_TIME timer_check (int);
521extern void mark_kboards (void); 521extern void mark_kboards (void);
522
523#ifdef WINDOWSNT
524extern const char *const lispy_function_keys[];
525#endif
diff --git a/src/lisp.h b/src/lisp.h
index 04d75d55dc6..283b0989c1d 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2581,6 +2581,7 @@ extern void syms_of_insdel (void);
2581 2581
2582/* Defined in dispnew.c */ 2582/* Defined in dispnew.c */
2583extern Lisp_Object selected_frame; 2583extern Lisp_Object selected_frame;
2584extern Lisp_Object Vwindow_system;
2584EXFUN (Fding, 1); 2585EXFUN (Fding, 1);
2585EXFUN (Fredraw_frame, 1); 2586EXFUN (Fredraw_frame, 1);
2586EXFUN (Fsleep_for, 2); 2587EXFUN (Fsleep_for, 2);
@@ -2990,6 +2991,7 @@ extern Lisp_Object Qfile_error;
2990extern Lisp_Object Qfile_exists_p; 2991extern Lisp_Object Qfile_exists_p;
2991extern Lisp_Object Qfile_directory_p; 2992extern Lisp_Object Qfile_directory_p;
2992extern Lisp_Object Qinsert_file_contents; 2993extern Lisp_Object Qinsert_file_contents;
2994extern Lisp_Object Qfile_name_history;
2993EXFUN (Ffind_file_name_handler, 2); 2995EXFUN (Ffind_file_name_handler, 2);
2994EXFUN (Ffile_name_as_directory, 1); 2996EXFUN (Ffile_name_as_directory, 1);
2995EXFUN (Fexpand_file_name, 2); 2997EXFUN (Fexpand_file_name, 2);
diff --git a/src/print.c b/src/print.c
index b2e5965cd1c..5b2778cf251 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1173,6 +1173,16 @@ print (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag)
1173 print_object (obj, printcharfun, escapeflag); 1173 print_object (obj, printcharfun, escapeflag);
1174} 1174}
1175 1175
1176#define PRINT_CIRCLE_CANDIDATE_P(obj) \
1177 (STRINGP (obj) || CONSP (obj) \
1178 || (VECTORLIKEP (obj) \
1179 && (VECTORP (obj) || COMPILEDP (obj) \
1180 || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj) \
1181 || HASH_TABLE_P (obj) || FONTP (obj))) \
1182 || (! NILP (Vprint_gensym) \
1183 && SYMBOLP (obj) \
1184 && !SYMBOL_INTERNED_P (obj)))
1185
1176/* Construct Vprint_number_table according to the structure of OBJ. 1186/* Construct Vprint_number_table according to the structure of OBJ.
1177 OBJ itself and all its elements will be added to Vprint_number_table 1187 OBJ itself and all its elements will be added to Vprint_number_table
1178 recursively if it is a list, vector, compiled function, char-table, 1188 recursively if it is a list, vector, compiled function, char-table,
@@ -1207,12 +1217,7 @@ print_preprocess (Lisp_Object obj)
1207 halftail = obj; 1217 halftail = obj;
1208 1218
1209 loop: 1219 loop:
1210 if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) 1220 if (PRINT_CIRCLE_CANDIDATE_P (obj))
1211 || COMPILEDP (obj) || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj)
1212 || HASH_TABLE_P (obj)
1213 || (! NILP (Vprint_gensym)
1214 && SYMBOLP (obj)
1215 && !SYMBOL_INTERNED_P (obj)))
1216 { 1221 {
1217 if (!HASH_TABLE_P (Vprint_number_table)) 1222 if (!HASH_TABLE_P (Vprint_number_table))
1218 { 1223 {
@@ -1389,12 +1394,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
1389 error ("Apparently circular structure being printed"); 1394 error ("Apparently circular structure being printed");
1390 1395
1391 /* Detect circularities and truncate them. */ 1396 /* Detect circularities and truncate them. */
1392 if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) 1397 if (PRINT_CIRCLE_CANDIDATE_P (obj))
1393 || COMPILEDP (obj) || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj)
1394 || HASH_TABLE_P (obj)
1395 || (! NILP (Vprint_gensym)
1396 && SYMBOLP (obj)
1397 && !SYMBOL_INTERNED_P (obj)))
1398 { 1398 {
1399 if (NILP (Vprint_circle) && NILP (Vprint_gensym)) 1399 if (NILP (Vprint_circle) && NILP (Vprint_gensym))
1400 { 1400 {
diff --git a/src/w32.c b/src/w32.c
index ae2373be46e..721cea07d20 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -147,9 +147,6 @@ typedef HRESULT (WINAPI * ShGetFolderPath_fn)
147void globals_of_w32 (void); 147void globals_of_w32 (void);
148static DWORD get_rid (PSID); 148static DWORD get_rid (PSID);
149 149
150/* Defined in process.c for its own purpose. */
151extern Lisp_Object Qlocal;
152
153 150
154/* Initialization states. 151/* Initialization states.
155 152
@@ -5666,8 +5663,6 @@ sys_write (int fd, const void * buffer, unsigned int count)
5666static void 5663static void
5667check_windows_init_file (void) 5664check_windows_init_file (void)
5668{ 5665{
5669 extern int noninteractive, inhibit_window_system;
5670
5671 /* A common indication that Emacs is not installed properly is when 5666 /* A common indication that Emacs is not installed properly is when
5672 it cannot find the Windows installation file. If this file does 5667 it cannot find the Windows installation file. If this file does
5673 not exist in the expected place, tell the user. */ 5668 not exist in the expected place, tell the user. */
diff --git a/src/w32console.c b/src/w32console.c
index 31c4a7c4e5a..3c200405cb5 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -41,12 +41,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
41/* from window.c */ 41/* from window.c */
42extern Lisp_Object Frecenter (Lisp_Object); 42extern Lisp_Object Frecenter (Lisp_Object);
43 43
44/* from keyboard.c */
45extern int detect_input_pending (void);
46
47/* from sysdep.c */
48extern int read_input_pending (void);
49
50static void w32con_move_cursor (struct frame *f, int row, int col); 44static void w32con_move_cursor (struct frame *f, int row, int col);
51static void w32con_clear_to_end (struct frame *f); 45static void w32con_clear_to_end (struct frame *f);
52static void w32con_clear_frame (struct frame *f); 46static void w32con_clear_frame (struct frame *f);
@@ -277,9 +271,6 @@ w32con_insert_glyphs (struct frame *f, register struct glyph *start,
277 } 271 }
278} 272}
279 273
280extern unsigned char *encode_terminal_code (struct glyph *, int,
281 struct coding_system *);
282
283static void 274static void
284w32con_write_glyphs (struct frame *f, register struct glyph *string, 275w32con_write_glyphs (struct frame *f, register struct glyph *string,
285 register int len) 276 register int len)
diff --git a/src/w32fns.c b/src/w32fns.c
index 09442d41e14..0c899cdceff 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -80,10 +80,6 @@ extern void w32_menu_display_help (HWND, HMENU, UINT, UINT);
80extern void w32_free_menu_strings (HWND); 80extern void w32_free_menu_strings (HWND);
81extern const char *map_w32_filename (const char *, const char **); 81extern const char *map_w32_filename (const char *, const char **);
82 82
83extern int quit_char;
84
85extern const char *const lispy_function_keys[];
86
87/* If non-zero, a w32 timer that, when it expires, displays an 83/* If non-zero, a w32 timer that, when it expires, displays an
88 hourglass cursor on all frames. */ 84 hourglass cursor on all frames. */
89static unsigned hourglass_timer = 0; 85static unsigned hourglass_timer = 0;
@@ -187,18 +183,10 @@ unsigned int msh_mousewheel = 0;
187#define MENU_FREE_DELAY 1000 183#define MENU_FREE_DELAY 1000
188static unsigned menu_free_timer = 0; 184static unsigned menu_free_timer = 0;
189 185
190extern Lisp_Object Qtooltip;
191
192#ifdef GLYPH_DEBUG 186#ifdef GLYPH_DEBUG
193int image_cache_refcount, dpyinfo_refcount; 187int image_cache_refcount, dpyinfo_refcount;
194#endif 188#endif
195 189
196
197extern HWND w32_system_caret_hwnd;
198
199extern int w32_system_caret_height;
200extern int w32_system_caret_x;
201extern int w32_system_caret_y;
202static HWND w32_visible_system_caret_hwnd; 190static HWND w32_visible_system_caret_hwnd;
203 191
204/* From w32menu.c */ 192/* From w32menu.c */
@@ -5851,7 +5839,6 @@ Value is t if tooltip was open, nil otherwise. */)
5851/*********************************************************************** 5839/***********************************************************************
5852 File selection dialog 5840 File selection dialog
5853 ***********************************************************************/ 5841 ***********************************************************************/
5854extern Lisp_Object Qfile_name_history;
5855 5842
5856/* Callback for altering the behavior of the Open File dialog. 5843/* Callback for altering the behavior of the Open File dialog.
5857 Makes the Filename text field contain "Current Directory" and be 5844 Makes the Filename text field contain "Current Directory" and be
@@ -5899,7 +5886,7 @@ file_dialog_callback (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
5899 no man's land and the user will be unable to tab through the 5886 no man's land and the user will be unable to tab through the
5900 dialog box (pressing tab will only result in a beep). 5887 dialog box (pressing tab will only result in a beep).
5901 Avoid that problem by setting focus to the list here. */ 5888 Avoid that problem by setting focus to the list here. */
5902 if (CDN_INITDONE == notify->hdr.code) 5889 if (notify->hdr.code == CDN_INITDONE)
5903 SetFocus (list); 5890 SetFocus (list);
5904 } 5891 }
5905 else 5892 else
diff --git a/src/w32font.c b/src/w32font.c
index aef62f61a3a..40ff0782b88 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -54,8 +54,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
54#define JOHAB_CHARSET 130 54#define JOHAB_CHARSET 130
55#endif 55#endif
56 56
57extern struct font_driver w32font_driver;
58
59Lisp_Object Qgdi; 57Lisp_Object Qgdi;
60Lisp_Object Quniscribe; 58Lisp_Object Quniscribe;
61static Lisp_Object QCformat; 59static Lisp_Object QCformat;
@@ -64,7 +62,6 @@ static Lisp_Object Qserif, Qscript, Qdecorative;
64static Lisp_Object Qraster, Qoutline, Qunknown; 62static Lisp_Object Qraster, Qoutline, Qunknown;
65 63
66/* antialiasing */ 64/* antialiasing */
67extern Lisp_Object QCantialias, QCotf, QClang; /* defined in font.c */
68extern Lisp_Object Qnone; /* reuse from w32fns.c */ 65extern Lisp_Object Qnone; /* reuse from w32fns.c */
69static Lisp_Object Qstandard, Qsubpixel, Qnatural; 66static Lisp_Object Qstandard, Qsubpixel, Qnatural;
70 67
diff --git a/src/w32inevt.c b/src/w32inevt.c
index d0b097100fd..c4858dea908 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -40,18 +40,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
40#include "w32heap.h" 40#include "w32heap.h"
41#include "w32term.h" 41#include "w32term.h"
42 42
43/* stdin, from ntterm */ 43/* stdin, from w32console.c */
44extern HANDLE keyboard_handle; 44extern HANDLE keyboard_handle;
45 45
46/* Info for last mouse motion */ 46/* Info for last mouse motion */
47static COORD movement_pos; 47static COORD movement_pos;
48static DWORD movement_time; 48static DWORD movement_time;
49 49
50/* from keyboard.c */ 50/* from w32fns.c */
51extern void reinvoke_input_signal (void);
52
53extern unsigned int map_keypad_keys (unsigned int, unsigned int); 51extern unsigned int map_keypad_keys (unsigned int, unsigned int);
54
55extern unsigned int w32_key_to_modifier (int key); 52extern unsigned int w32_key_to_modifier (int key);
56 53
57/* Event queue */ 54/* Event queue */
@@ -261,8 +258,6 @@ w32_kbd_patch_key (KEY_EVENT_RECORD *event)
261} 258}
262 259
263 260
264extern const char *const lispy_function_keys[];
265
266static int faked_key = 0; 261static int faked_key = 0;
267 262
268/* return code -1 means that event_queue_ptr won't be incremented. 263/* return code -1 means that event_queue_ptr won't be incremented.
diff --git a/src/w32menu.c b/src/w32menu.c
index 92447eb9fae..a2e62f24f6a 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -84,14 +84,6 @@ MessageBoxW_Proc unicode_message_box = NULL;
84 84
85Lisp_Object Qdebug_on_next_call; 85Lisp_Object Qdebug_on_next_call;
86 86
87extern Lisp_Object Qmenu_bar;
88
89extern Lisp_Object QCtoggle, QCradio;
90
91extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
92
93extern Lisp_Object Qmenu_bar_update_hook;
94
95void set_frame_menubar (FRAME_PTR, int, int); 87void set_frame_menubar (FRAME_PTR, int, int);
96 88
97#ifdef HAVE_DIALOGS 89#ifdef HAVE_DIALOGS
diff --git a/src/w32proc.c b/src/w32proc.c
index bb8b428ffe4..e94d9aa3254 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -67,8 +67,6 @@ extern BOOL WINAPI IsValidLocale (LCID, DWORD);
67 + ((DWORD)(var) - (section)->VirtualAddress) \ 67 + ((DWORD)(var) - (section)->VirtualAddress) \
68 + (filedata).file_base)) 68 + (filedata).file_base))
69 69
70extern Lisp_Object Qlocal;
71
72Lisp_Object Qhigh, Qlow; 70Lisp_Object Qhigh, Qlow;
73 71
74#ifdef EMACSDEBUG 72#ifdef EMACSDEBUG
@@ -1053,7 +1051,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
1053 detect that we were woken up by C-g, we return -1 with errno set to 1051 detect that we were woken up by C-g, we return -1 with errno set to
1054 EINTR as on Unix. */ 1052 EINTR as on Unix. */
1055 1053
1056/* From ntterm.c */ 1054/* From w32console.c */
1057extern HANDLE keyboard_handle; 1055extern HANDLE keyboard_handle;
1058 1056
1059/* From w32xfns.c */ 1057/* From w32xfns.c */
@@ -1559,8 +1557,6 @@ sys_kill (int pid, int sig)
1559 return rc; 1557 return rc;
1560} 1558}
1561 1559
1562/* extern int report_file_error (char *, Lisp_Object); */
1563
1564/* The following two routines are used to manipulate stdin, stdout, and 1560/* The following two routines are used to manipulate stdin, stdout, and
1565 stderr of our child processes. 1561 stderr of our child processes.
1566 1562
@@ -1660,7 +1656,7 @@ set_process_dir (char * dir)
1660 dial-up users to only be connected when they actually need to use 1656 dial-up users to only be connected when they actually need to use
1661 socket services. */ 1657 socket services. */
1662 1658
1663/* From nt.c */ 1659/* From w32.c */
1664extern HANDLE winsock_lib; 1660extern HANDLE winsock_lib;
1665extern BOOL term_winsock (void); 1661extern BOOL term_winsock (void);
1666extern BOOL init_winsock (int load_now); 1662extern BOOL init_winsock (int load_now);
diff --git a/src/w32select.c b/src/w32select.c
index 23d5fb68c77..ef0cb3adc24 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -78,7 +78,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
78#include "w32term.h" /* for all of the w32 includes */ 78#include "w32term.h" /* for all of the w32 includes */
79#include "w32heap.h" /* os_subtype */ 79#include "w32heap.h" /* os_subtype */
80#include "blockinput.h" 80#include "blockinput.h"
81#include "keyboard.h" /* cmd_error_internal() */
82#include "charset.h" 81#include "charset.h"
83#include "coding.h" 82#include "coding.h"
84#include "character.h" 83#include "character.h"
@@ -391,6 +390,7 @@ run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg)
391 with global variables and calling strange looking functions. Is 390 with global variables and calling strange looking functions. Is
392 this really the right way to run Lisp callbacks? */ 391 this really the right way to run Lisp callbacks? */
393 392
393 extern int waiting_for_input; /* from keyboard.c */
394 int owfi; 394 int owfi;
395 395
396 BLOCK_INPUT; 396 BLOCK_INPUT;
diff --git a/src/w32term.c b/src/w32term.c
index 67e853f21f0..f31c4e90e77 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -88,8 +88,6 @@ extern void free_frame_menubar (struct frame *);
88extern int w32_codepage_for_font (char *fontname); 88extern int w32_codepage_for_font (char *fontname);
89extern Cursor w32_load_cursor (LPCTSTR name); 89extern Cursor w32_load_cursor (LPCTSTR name);
90 90
91extern Lisp_Object Vwindow_system;
92
93#define x_any_window_to_frame x_window_to_frame 91#define x_any_window_to_frame x_window_to_frame
94#define x_top_window_to_frame x_window_to_frame 92#define x_top_window_to_frame x_window_to_frame
95 93
@@ -138,13 +136,6 @@ BOOL (WINAPI *pfnSetLayeredWindowAttributes) (HWND, COLORREF, BYTE, DWORD);
138#define WS_EX_LAYERED 0x80000 136#define WS_EX_LAYERED 0x80000
139#endif 137#endif
140 138
141/* Frame being updated by update_frame. This is declared in term.c.
142 This is set by update_begin and looked at by all the
143 w32 functions. It is zero while not inside an update.
144 In that case, the w32 functions assume that `SELECTED_FRAME ()'
145 is the frame to apply to. */
146extern struct frame *updating_frame;
147
148/* This is a frame waiting to be autoraised, within w32_read_socket. */ 139/* This is a frame waiting to be autoraised, within w32_read_socket. */
149struct frame *pending_autoraise_frame; 140struct frame *pending_autoraise_frame;
150 141
@@ -2536,8 +2527,7 @@ x_delete_glyphs (struct frame *f, register int n)
2536} 2527}
2537 2528
2538 2529
2539/* Clear entire frame. If updating_frame is non-null, clear that 2530/* Clear entire frame. */
2540 frame. Otherwise clear the selected frame. */
2541 2531
2542static void 2532static void
2543x_clear_frame (struct frame *f) 2533x_clear_frame (struct frame *f)
@@ -6060,7 +6050,7 @@ w32_create_terminal (struct w32_display_info *dpyinfo)
6060 terminal->mouse_position_hook = w32_mouse_position; 6050 terminal->mouse_position_hook = w32_mouse_position;
6061 terminal->frame_rehighlight_hook = w32_frame_rehighlight; 6051 terminal->frame_rehighlight_hook = w32_frame_rehighlight;
6062 terminal->frame_raise_lower_hook = w32_frame_raise_lower; 6052 terminal->frame_raise_lower_hook = w32_frame_raise_lower;
6063 // terminal->fullscreen_hook = XTfullscreen_hook; 6053 /* terminal->fullscreen_hook = XTfullscreen_hook; */
6064 terminal->set_vertical_scroll_bar_hook = w32_set_vertical_scroll_bar; 6054 terminal->set_vertical_scroll_bar_hook = w32_set_vertical_scroll_bar;
6065 terminal->condemn_scroll_bars_hook = w32_condemn_scroll_bars; 6055 terminal->condemn_scroll_bars_hook = w32_condemn_scroll_bars;
6066 terminal->redeem_scroll_bar_hook = w32_redeem_scroll_bar; 6056 terminal->redeem_scroll_bar_hook = w32_redeem_scroll_bar;
diff --git a/src/w32term.h b/src/w32term.h
index c79352a8db8..cf6751b7d63 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -547,7 +547,7 @@ do { \
547#define WM_APPCOMMAND 0x319 547#define WM_APPCOMMAND 0x319
548#define GET_APPCOMMAND_LPARAM(lParam) (HIWORD(lParam) & 0x7fff) 548#define GET_APPCOMMAND_LPARAM(lParam) (HIWORD(lParam) & 0x7fff)
549#endif 549#endif
550#ifndef WM_UNICHAR 550#ifndef WM_UNICHAR
551#define WM_UNICHAR 0x109 551#define WM_UNICHAR 0x109
552#endif 552#endif
553#ifndef UNICODE_NOCHAR 553#ifndef UNICODE_NOCHAR
@@ -697,3 +697,7 @@ typedef BOOL (WINAPI * AppendMenuW_Proc) (
697 IN UINT_PTR, 697 IN UINT_PTR,
698 IN LPCWSTR); 698 IN LPCWSTR);
699 699
700extern HWND w32_system_caret_hwnd;
701extern int w32_system_caret_height;
702extern int w32_system_caret_x;
703extern int w32_system_caret_y;
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index 319f934e3bb..39d1ee5c851 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -52,10 +52,6 @@ int uniscribe_available = 0;
52extern Lisp_Object Quniscribe; 52extern Lisp_Object Quniscribe;
53extern Lisp_Object Qopentype; 53extern Lisp_Object Qopentype;
54 54
55extern int initialized;
56
57extern struct font_driver uniscribe_font_driver;
58
59/* EnumFontFamiliesEx callback. */ 55/* EnumFontFamiliesEx callback. */
60static int CALLBACK add_opentype_font_name_to_list (ENUMLOGFONTEX *, 56static int CALLBACK add_opentype_font_name_to_list (ENUMLOGFONTEX *,
61 NEWTEXTMETRICEX *, 57 NEWTEXTMETRICEX *,