aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <[email protected]>2011-03-17 09:32:03 -0700
committerPaul Eggert <[email protected]>2011-03-17 09:32:03 -0700
commitb1d876f1a19ae65c8a8dd61c4ce17055ca53f16c (patch)
tree5dd8a40d7e3e0b86749cecfee7443ad81bdbfe5e /src
parentb766f86726fc2828a035cb8db149598a3a84de96 (diff)
parentd6cd56f187a791983579bf5d4ce3702d2ddf2499 (diff)
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 2b7d5289e6..7243eb2352 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -26,8 +26,6 @@
* deps.mk (unexalpha.o): Remove; unused.
-2011-03-16 Paul Eggert <[email protected]>
-
New file unexec.h, the (simple) interface for unexec (Bug#8267).
* unexec.h: New file.
* deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
@@ -98,8 +96,6 @@
Rename or remove local vars to avoid shadowing.
(Ftranslate_region_internal): Mark var as initialized.
-2011-03-15 Paul Eggert <[email protected]>
-
* doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
avoid shadowing.
@@ -249,10 +245,7 @@
(fix_start_end_in_overlays): Likewise. This function should be
simplified by using pointers-to-pointers, but that's a different
matter.
-
-2011-03-14 Paul Eggert <[email protected]>
-
- * buffer.c (switch_to_buffer_1): Now static.
+ (switch_to_buffer_1): Now static.
(Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
(report_overlay_modification): Rename locals to avoid shadowing.
@@ -317,6 +310,51 @@
if GCC considers string literals to be constants.
(Fdbus_register_service, Fdbus_register_method): Remove unused vars.
+2011-03-16 Stefan Monnier <[email protected]>
+
+ * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
+ (print_preprocess, print_object): New macro to fix last change.
+
+ * print.c (print_preprocess): Don't forget font objects.
+
+2011-03-16 Juanma Barranquero <[email protected]>
+
+ * emacs.c (USAGE3): Doc fixes.
+
+2011-03-15 Andreas Schwab <[email protected]>
+
+ * coding.c (detect_coding_iso_2022): Reorganize code to clarify
+ structure.
+
+2011-03-14 Juanma Barranquero <[email protected]>
+
+ * lisp.h (VWindow_system, Qfile_name_history):
+ * keyboard.h (lispy_function_keys) [WINDOWSNT]:
+ * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
+ (w32_system_caret_x, w32_system_caret_y): Declare extern.
+
+ * w32select.c: Don't #include "keyboard.h".
+ (run_protected): Add extern declaration for waiting_for_input.
+
+ * w32.c (Qlocal, noninteractive1, inhibit_window_system):
+ * w32console.c (detect_input_pending, read_input_pending)
+ (encode_terminal_code):
+ * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
+ (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
+ (w32_system_caret_y, Qfile_name_history):
+ * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
+ * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
+ * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
+ (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
+ * w32proc.c (Qlocal, report_file_error):
+ * w32term.c (Vwindow_system, updating_frame):
+ * w32uniscribe.c (initialized, uniscribe_font_driver):
+ Remove unneeded extern declarations.
+
+2011-03-14 Chong Yidong <[email protected]>
+
+ * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
+
2011-03-13 Chong Yidong <[email protected]>
* buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
@@ -420,7 +458,7 @@
2011-03-12 Eli Zaretskii <[email protected]>
- * termcap.c [MSDOS]: Include "msdos.h.
+ * termcap.c [MSDOS]: Include "msdos.h".
(find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
Constify `char *' arguments and their references according to
prototypes in tparam.h.
diff --git a/src/buffer.c b/src/buffer.c
index b718bf3e57..c0e6866dee 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. */)
/* Make sure the base buffer has markers for its narrowing. */
if (NILP (BVAR (b->base_buffer, pt_marker)))
{
- eassert (NILP (BVAR (b, begv_marker)));
- eassert (NILP (BVAR (b, zv_marker)));
+ eassert (NILP (BVAR (b->base_buffer, begv_marker)));
+ eassert (NILP (BVAR (b->base_buffer, zv_marker)));
BVAR (b->base_buffer, pt_marker) = Fmake_marker ();
set_marker_both (BVAR (b->base_buffer, pt_marker), base_buffer,
diff --git a/src/coding.c b/src/coding.c
index 9a6a4484e5..0c2836c19f 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -2954,12 +2954,7 @@ detect_coding_iso_2022 (struct coding_system *coding,
const unsigned char *src_end = coding->source + coding->src_bytes;
int multibytep = coding->src_multibyte;
int single_shifting = 0;
-
- /* FIXME: Does ID need to be initialized here? The "End of composition"
- code below does not initialize ID even though ID is used
- afterwards, and perhaps that is a bug. */
- int id = 0;
-
+ int id;
int c, c1;
int consumed_chars = 0;
int i;
@@ -2999,40 +2994,11 @@ detect_coding_iso_2022 (struct coding_system *coding,
break;
single_shifting = 0;
ONE_MORE_BYTE (c);
- if (c >= '(' && c <= '/')
- {
- /* Designation sequence for a charset of dimension 1. */
- ONE_MORE_BYTE (c1);
- if (c1 < ' ' || c1 >= 0x80
- || (id = iso_charset_table[0][c >= ','][c1]) < 0)
- /* Invalid designation sequence. Just ignore. */
- break;
- }
- else if (c == '$')
- {
- /* Designation sequence for a charset of dimension 2. */
- ONE_MORE_BYTE (c);
- if (c >= '@' && c <= 'B')
- /* Designation for JISX0208.1978, GB2312, or JISX0208. */
- id = iso_charset_table[1][0][c];
- else if (c >= '(' && c <= '/')
- {
- ONE_MORE_BYTE (c1);
- if (c1 < ' ' || c1 >= 0x80
- || (id = iso_charset_table[1][c >= ','][c1]) < 0)
- /* Invalid designation sequence. Just ignore. */
- break;
- }
- else
- /* Invalid designation sequence. Just ignore it. */
- break;
- }
- else if (c == 'N' || c == 'O')
+ if (c == 'N' || c == 'O')
{
/* ESC <Fe> for SS2 or SS3. */
single_shifting = 1;
rejected |= CATEGORY_MASK_ISO_7BIT | CATEGORY_MASK_ISO_8BIT;
- break;
}
else if (c == '1')
{
@@ -3048,36 +3014,66 @@ detect_coding_iso_2022 (struct coding_system *coding,
{
/* ESC <Fp> for start/end composition. */
composition_count = 0;
- break;
}
else
{
- /* Invalid escape sequence. Just ignore it. */
- break;
- }
+ if (c >= '(' && c <= '/')
+ {
+ /* Designation sequence for a charset of dimension 1. */
+ ONE_MORE_BYTE (c1);
+ if (c1 < ' ' || c1 >= 0x80
+ || (id = iso_charset_table[0][c >= ','][c1]) < 0)
+ /* Invalid designation sequence. Just ignore. */
+ break;
+ }
+ else if (c == '$')
+ {
+ /* Designation sequence for a charset of dimension 2. */
+ ONE_MORE_BYTE (c);
+ if (c >= '@' && c <= 'B')
+ /* Designation for JISX0208.1978, GB2312, or JISX0208. */
+ id = iso_charset_table[1][0][c];
+ else if (c >= '(' && c <= '/')
+ {
+ ONE_MORE_BYTE (c1);
+ if (c1 < ' ' || c1 >= 0x80
+ || (id = iso_charset_table[1][c >= ','][c1]) < 0)
+ /* Invalid designation sequence. Just ignore. */
+ break;
+ }
+ else
+ /* Invalid designation sequence. Just ignore it. */
+ break;
+ }
+ else
+ {
+ /* Invalid escape sequence. Just ignore it. */
+ break;
+ }
- /* We found a valid designation sequence for CHARSET. */
- rejected |= CATEGORY_MASK_ISO_8BIT;
- if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7],
- id))
- found |= CATEGORY_MASK_ISO_7;
- else
- rejected |= CATEGORY_MASK_ISO_7;
- if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7_tight],
- id))
- found |= CATEGORY_MASK_ISO_7_TIGHT;
- else
- rejected |= CATEGORY_MASK_ISO_7_TIGHT;
- if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7_else],
- id))
- found |= CATEGORY_MASK_ISO_7_ELSE;
- else
- rejected |= CATEGORY_MASK_ISO_7_ELSE;
- if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_8_else],
- id))
- found |= CATEGORY_MASK_ISO_8_ELSE;
- else
- rejected |= CATEGORY_MASK_ISO_8_ELSE;
+ /* We found a valid designation sequence for CHARSET. */
+ rejected |= CATEGORY_MASK_ISO_8BIT;
+ if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7],
+ id))
+ found |= CATEGORY_MASK_ISO_7;
+ else
+ rejected |= CATEGORY_MASK_ISO_7;
+ if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7_tight],
+ id))
+ found |= CATEGORY_MASK_ISO_7_TIGHT;
+ else
+ rejected |= CATEGORY_MASK_ISO_7_TIGHT;
+ if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_7_else],
+ id))
+ found |= CATEGORY_MASK_ISO_7_ELSE;
+ else
+ rejected |= CATEGORY_MASK_ISO_7_ELSE;
+ if (SAFE_CHARSET_P (&coding_categories[coding_category_iso_8_else],
+ id))
+ found |= CATEGORY_MASK_ISO_8_ELSE;
+ else
+ rejected |= CATEGORY_MASK_ISO_8_ELSE;
+ }
break;
case ISO_CODE_SO:
@@ -3105,13 +3101,32 @@ detect_coding_iso_2022 (struct coding_system *coding,
rejected |= CATEGORY_MASK_ISO_7BIT;
if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_1])
& CODING_ISO_FLAG_SINGLE_SHIFT)
- found |= CATEGORY_MASK_ISO_8_1, single_shifting = 1;
+ {
+ found |= CATEGORY_MASK_ISO_8_1;
+ single_shifting = 1;
+ }
if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_2])
& CODING_ISO_FLAG_SINGLE_SHIFT)
- found |= CATEGORY_MASK_ISO_8_2, single_shifting = 1;
+ {
+ found |= CATEGORY_MASK_ISO_8_2;
+ single_shifting = 1;
+ }
if (single_shifting)
break;
- goto check_extra_latin;
+ check_extra_latin:
+ if (! VECTORP (Vlatin_extra_code_table)
+ || NILP (XVECTOR (Vlatin_extra_code_table)->contents[c]))
+ {
+ rejected = CATEGORY_MASK_ISO;
+ break;
+ }
+ if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_1])
+ & CODING_ISO_FLAG_LATIN_EXTRA)
+ found |= CATEGORY_MASK_ISO_8_1;
+ else
+ rejected |= CATEGORY_MASK_ISO_8_1;
+ rejected |= CATEGORY_MASK_ISO_8_2;
+ break;
default:
if (c < 0)
@@ -3162,20 +3177,6 @@ detect_coding_iso_2022 (struct coding_system *coding,
}
break;
}
- check_extra_latin:
- single_shifting = 0;
- if (! VECTORP (Vlatin_extra_code_table)
- || NILP (XVECTOR (Vlatin_extra_code_table)->contents[c]))
- {
- rejected = CATEGORY_MASK_ISO;
- break;
- }
- if (CODING_ISO_FLAGS (&coding_categories[coding_category_iso_8_1])
- & CODING_ISO_FLAG_LATIN_EXTRA)
- found |= CATEGORY_MASK_ISO_8_1;
- else
- rejected |= CATEGORY_MASK_ISO_8_1;
- rejected |= CATEGORY_MASK_ISO_8_2;
}
}
detect_info->rejected |= CATEGORY_MASK_ISO;
diff --git a/src/emacs.c b/src/emacs.c
index d30d42f1ee..052f22ea62 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -141,7 +141,7 @@ Lisp_Object Qfile_name_handler_alist;
Lisp_Object Qrisky_local_variable;
-/* If non-zero, emacs should not attempt to use a window-specific code,
+/* If non-zero, Emacs should not attempt to use a window-specific code,
but instead should use the virtual terminal under which it was started. */
int inhibit_window_system;
@@ -169,7 +169,6 @@ static unsigned long heap_bss_diff;
#define MAX_HEAP_BSS_DIFF (1024*1024)
/* Nonzero means running Emacs without interactive terminal. */
-
int noninteractive;
/* Nonzero means remove site-lisp directories from load-path. */
@@ -249,14 +248,14 @@ Display options:\n\
--border-color, -bd COLOR main border color\n\
--border-width, -bw WIDTH width of main border\n\
--color, --color=MODE override color mode for character terminals;\n\
- MODE defaults to `auto', and can also\n\
- be `never', `auto', `always',\n\
+ MODE defaults to `auto', and\n\
+ can also be `never', `always',\n\
or a mode name like `ansi8'\n\
--cursor-color, -cr COLOR color of the Emacs cursor indicating point\n\
--font, -fn FONT default font; must be fixed-width\n\
--foreground-color, -fg COLOR window foreground color\n\
--fullheight, -fh make the first frame high as the screen\n\
---fullscreen, -fs make first frame fullscreen\n\
+--fullscreen, -fs make the first frame fullscreen\n\
--fullwidth, -fw make the first frame wide as the screen\n\
--maximized, -mm make the first frame maximized\n\
--geometry, -g GEOMETRY window geometry\n\
@@ -577,7 +576,8 @@ DEFINE_DUMMY_FUNCTION (__main)
enough information to do it right. */
static int
-argmatch (char **argv, int argc, const char *sstr, const char *lstr, int minlen, char **valptr, int *skipptr)
+argmatch (char **argv, int argc, const char *sstr, const char *lstr,
+ int minlen, char **valptr, int *skipptr)
{
char *p = NULL;
int arglen;
diff --git a/src/keyboard.h b/src/keyboard.h
index 765979b399..00745a0914 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -519,3 +519,7 @@ extern int tty_read_avail_input (struct terminal *, int,
struct input_event *);
extern EMACS_TIME timer_check (int);
extern void mark_kboards (void);
+
+#ifdef WINDOWSNT
+extern const char *const lispy_function_keys[];
+#endif
diff --git a/src/lisp.h b/src/lisp.h
index 04d75d55dc..283b0989c1 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2581,6 +2581,7 @@ extern void syms_of_insdel (void);
/* Defined in dispnew.c */
extern Lisp_Object selected_frame;
+extern Lisp_Object Vwindow_system;
EXFUN (Fding, 1);
EXFUN (Fredraw_frame, 1);
EXFUN (Fsleep_for, 2);
@@ -2990,6 +2991,7 @@ extern Lisp_Object Qfile_error;
extern Lisp_Object Qfile_exists_p;
extern Lisp_Object Qfile_directory_p;
extern Lisp_Object Qinsert_file_contents;
+extern Lisp_Object Qfile_name_history;
EXFUN (Ffind_file_name_handler, 2);
EXFUN (Ffile_name_as_directory, 1);
EXFUN (Fexpand_file_name, 2);
diff --git a/src/print.c b/src/print.c
index b2e5965cd1..5b2778cf25 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1173,6 +1173,16 @@ print (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag)
print_object (obj, printcharfun, escapeflag);
}
+#define PRINT_CIRCLE_CANDIDATE_P(obj) \
+ (STRINGP (obj) || CONSP (obj) \
+ || (VECTORLIKEP (obj) \
+ && (VECTORP (obj) || COMPILEDP (obj) \
+ || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj) \
+ || HASH_TABLE_P (obj) || FONTP (obj))) \
+ || (! NILP (Vprint_gensym) \
+ && SYMBOLP (obj) \
+ && !SYMBOL_INTERNED_P (obj)))
+
/* Construct Vprint_number_table according to the structure of OBJ.
OBJ itself and all its elements will be added to Vprint_number_table
recursively if it is a list, vector, compiled function, char-table,
@@ -1207,12 +1217,7 @@ print_preprocess (Lisp_Object obj)
halftail = obj;
loop:
- if (STRINGP (obj) || CONSP (obj) || VECTORP (obj)
- || COMPILEDP (obj) || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj)
- || HASH_TABLE_P (obj)
- || (! NILP (Vprint_gensym)
- && SYMBOLP (obj)
- && !SYMBOL_INTERNED_P (obj)))
+ if (PRINT_CIRCLE_CANDIDATE_P (obj))
{
if (!HASH_TABLE_P (Vprint_number_table))
{
@@ -1389,12 +1394,7 @@ print_object (Lisp_Object obj, register Lisp_Object printcharfun, int escapeflag
error ("Apparently circular structure being printed");
/* Detect circularities and truncate them. */
- if (STRINGP (obj) || CONSP (obj) || VECTORP (obj)
- || COMPILEDP (obj) || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj)
- || HASH_TABLE_P (obj)
- || (! NILP (Vprint_gensym)
- && SYMBOLP (obj)
- && !SYMBOL_INTERNED_P (obj)))
+ if (PRINT_CIRCLE_CANDIDATE_P (obj))
{
if (NILP (Vprint_circle) && NILP (Vprint_gensym))
{
diff --git a/src/w32.c b/src/w32.c
index ae2373be46..721cea07d2 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -147,9 +147,6 @@ typedef HRESULT (WINAPI * ShGetFolderPath_fn)
void globals_of_w32 (void);
static DWORD get_rid (PSID);
-/* Defined in process.c for its own purpose. */
-extern Lisp_Object Qlocal;
-
/* Initialization states.
@@ -5666,8 +5663,6 @@ sys_write (int fd, const void * buffer, unsigned int count)
static void
check_windows_init_file (void)
{
- extern int noninteractive, inhibit_window_system;
-
/* A common indication that Emacs is not installed properly is when
it cannot find the Windows installation file. If this file does
not exist in the expected place, tell the user. */
diff --git a/src/w32console.c b/src/w32console.c
index 31c4a7c4e5..3c200405cb 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/>. */
/* from window.c */
extern Lisp_Object Frecenter (Lisp_Object);
-/* from keyboard.c */
-extern int detect_input_pending (void);
-
-/* from sysdep.c */
-extern int read_input_pending (void);
-
static void w32con_move_cursor (struct frame *f, int row, int col);
static void w32con_clear_to_end (struct frame *f);
static void w32con_clear_frame (struct frame *f);
@@ -277,9 +271,6 @@ w32con_insert_glyphs (struct frame *f, register struct glyph *start,
}
}
-extern unsigned char *encode_terminal_code (struct glyph *, int,
- struct coding_system *);
-
static void
w32con_write_glyphs (struct frame *f, register struct glyph *string,
register int len)
diff --git a/src/w32fns.c b/src/w32fns.c
index 09442d41e1..0c899cdcef 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -80,10 +80,6 @@ extern void w32_menu_display_help (HWND, HMENU, UINT, UINT);
extern void w32_free_menu_strings (HWND);
extern const char *map_w32_filename (const char *, const char **);
-extern int quit_char;
-
-extern const char *const lispy_function_keys[];
-
/* If non-zero, a w32 timer that, when it expires, displays an
hourglass cursor on all frames. */
static unsigned hourglass_timer = 0;
@@ -187,18 +183,10 @@ unsigned int msh_mousewheel = 0;
#define MENU_FREE_DELAY 1000
static unsigned menu_free_timer = 0;
-extern Lisp_Object Qtooltip;
-
#ifdef GLYPH_DEBUG
int image_cache_refcount, dpyinfo_refcount;
#endif
-
-extern HWND w32_system_caret_hwnd;
-
-extern int w32_system_caret_height;
-extern int w32_system_caret_x;
-extern int w32_system_caret_y;
static HWND w32_visible_system_caret_hwnd;
/* From w32menu.c */
@@ -5851,7 +5839,6 @@ Value is t if tooltip was open, nil otherwise. */)
/***********************************************************************
File selection dialog
***********************************************************************/
-extern Lisp_Object Qfile_name_history;
/* Callback for altering the behavior of the Open File dialog.
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)
no man's land and the user will be unable to tab through the
dialog box (pressing tab will only result in a beep).
Avoid that problem by setting focus to the list here. */
- if (CDN_INITDONE == notify->hdr.code)
+ if (notify->hdr.code == CDN_INITDONE)
SetFocus (list);
}
else
diff --git a/src/w32font.c b/src/w32font.c
index aef62f61a3..40ff0782b8 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/>. */
#define JOHAB_CHARSET 130
#endif
-extern struct font_driver w32font_driver;
-
Lisp_Object Qgdi;
Lisp_Object Quniscribe;
static Lisp_Object QCformat;
@@ -64,7 +62,6 @@ static Lisp_Object Qserif, Qscript, Qdecorative;
static Lisp_Object Qraster, Qoutline, Qunknown;
/* antialiasing */
-extern Lisp_Object QCantialias, QCotf, QClang; /* defined in font.c */
extern Lisp_Object Qnone; /* reuse from w32fns.c */
static Lisp_Object Qstandard, Qsubpixel, Qnatural;
diff --git a/src/w32inevt.c b/src/w32inevt.c
index d0b097100f..c4858dea90 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/>. */
#include "w32heap.h"
#include "w32term.h"
-/* stdin, from ntterm */
+/* stdin, from w32console.c */
extern HANDLE keyboard_handle;
/* Info for last mouse motion */
static COORD movement_pos;
static DWORD movement_time;
-/* from keyboard.c */
-extern void reinvoke_input_signal (void);
-
+/* from w32fns.c */
extern unsigned int map_keypad_keys (unsigned int, unsigned int);
-
extern unsigned int w32_key_to_modifier (int key);
/* Event queue */
@@ -261,8 +258,6 @@ w32_kbd_patch_key (KEY_EVENT_RECORD *event)
}
-extern const char *const lispy_function_keys[];
-
static int faked_key = 0;
/* return code -1 means that event_queue_ptr won't be incremented.
diff --git a/src/w32menu.c b/src/w32menu.c
index 92447eb9fa..a2e62f24f6 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -84,14 +84,6 @@ MessageBoxW_Proc unicode_message_box = NULL;
Lisp_Object Qdebug_on_next_call;
-extern Lisp_Object Qmenu_bar;
-
-extern Lisp_Object QCtoggle, QCradio;
-
-extern Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
-
-extern Lisp_Object Qmenu_bar_update_hook;
-
void set_frame_menubar (FRAME_PTR, int, int);
#ifdef HAVE_DIALOGS
diff --git a/src/w32proc.c b/src/w32proc.c
index bb8b428ffe..e94d9aa325 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -67,8 +67,6 @@ extern BOOL WINAPI IsValidLocale (LCID, DWORD);
+ ((DWORD)(var) - (section)->VirtualAddress) \
+ (filedata).file_base))
-extern Lisp_Object Qlocal;
-
Lisp_Object Qhigh, Qlow;
#ifdef EMACSDEBUG
@@ -1053,7 +1051,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
detect that we were woken up by C-g, we return -1 with errno set to
EINTR as on Unix. */
-/* From ntterm.c */
+/* From w32console.c */
extern HANDLE keyboard_handle;
/* From w32xfns.c */
@@ -1559,8 +1557,6 @@ sys_kill (int pid, int sig)
return rc;
}
-/* extern int report_file_error (char *, Lisp_Object); */
-
/* The following two routines are used to manipulate stdin, stdout, and
stderr of our child processes.
@@ -1660,7 +1656,7 @@ set_process_dir (char * dir)
dial-up users to only be connected when they actually need to use
socket services. */
-/* From nt.c */
+/* From w32.c */
extern HANDLE winsock_lib;
extern BOOL term_winsock (void);
extern BOOL init_winsock (int load_now);
diff --git a/src/w32select.c b/src/w32select.c
index 23d5fb68c7..ef0cb3adc2 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/>. */
#include "w32term.h" /* for all of the w32 includes */
#include "w32heap.h" /* os_subtype */
#include "blockinput.h"
-#include "keyboard.h" /* cmd_error_internal() */
#include "charset.h"
#include "coding.h"
#include "character.h"
@@ -391,6 +390,7 @@ run_protected (Lisp_Object (*code) (Lisp_Object), Lisp_Object arg)
with global variables and calling strange looking functions. Is
this really the right way to run Lisp callbacks? */
+ extern int waiting_for_input; /* from keyboard.c */
int owfi;
BLOCK_INPUT;
diff --git a/src/w32term.c b/src/w32term.c
index 67e853f21f..f31c4e90e7 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -88,8 +88,6 @@ extern void free_frame_menubar (struct frame *);
extern int w32_codepage_for_font (char *fontname);
extern Cursor w32_load_cursor (LPCTSTR name);
-extern Lisp_Object Vwindow_system;
-
#define x_any_window_to_frame x_window_to_frame
#define x_top_window_to_frame x_window_to_frame
@@ -138,13 +136,6 @@ BOOL (WINAPI *pfnSetLayeredWindowAttributes) (HWND, COLORREF, BYTE, DWORD);
#define WS_EX_LAYERED 0x80000
#endif
-/* Frame being updated by update_frame. This is declared in term.c.
- This is set by update_begin and looked at by all the
- w32 functions. It is zero while not inside an update.
- In that case, the w32 functions assume that `SELECTED_FRAME ()'
- is the frame to apply to. */
-extern struct frame *updating_frame;
-
/* This is a frame waiting to be autoraised, within w32_read_socket. */
struct frame *pending_autoraise_frame;
@@ -2536,8 +2527,7 @@ x_delete_glyphs (struct frame *f, register int n)
}
-/* Clear entire frame. If updating_frame is non-null, clear that
- frame. Otherwise clear the selected frame. */
+/* Clear entire frame. */
static void
x_clear_frame (struct frame *f)
@@ -6060,7 +6050,7 @@ w32_create_terminal (struct w32_display_info *dpyinfo)
terminal->mouse_position_hook = w32_mouse_position;
terminal->frame_rehighlight_hook = w32_frame_rehighlight;
terminal->frame_raise_lower_hook = w32_frame_raise_lower;
- // terminal->fullscreen_hook = XTfullscreen_hook;
+ /* terminal->fullscreen_hook = XTfullscreen_hook; */
terminal->set_vertical_scroll_bar_hook = w32_set_vertical_scroll_bar;
terminal->condemn_scroll_bars_hook = w32_condemn_scroll_bars;
terminal->redeem_scroll_bar_hook = w32_redeem_scroll_bar;
diff --git a/src/w32term.h b/src/w32term.h
index c79352a8db..cf6751b7d6 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -547,7 +547,7 @@ do { \
#define WM_APPCOMMAND 0x319
#define GET_APPCOMMAND_LPARAM(lParam) (HIWORD(lParam) & 0x7fff)
#endif
-#ifndef WM_UNICHAR
+#ifndef WM_UNICHAR
#define WM_UNICHAR 0x109
#endif
#ifndef UNICODE_NOCHAR
@@ -697,3 +697,7 @@ typedef BOOL (WINAPI * AppendMenuW_Proc) (
IN UINT_PTR,
IN LPCWSTR);
+extern HWND w32_system_caret_hwnd;
+extern int w32_system_caret_height;
+extern int w32_system_caret_x;
+extern int w32_system_caret_y;
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index 319f934e3b..39d1ee5c85 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -52,10 +52,6 @@ int uniscribe_available = 0;
extern Lisp_Object Quniscribe;
extern Lisp_Object Qopentype;
-extern int initialized;
-
-extern struct font_driver uniscribe_font_driver;
-
/* EnumFontFamiliesEx callback. */
static int CALLBACK add_opentype_font_name_to_list (ENUMLOGFONTEX *,
NEWTEXTMETRICEX *,