X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/257210319f10abebbfd7c12784cf3a8e112c3562..2ab329f3b5d52a39f0a45c3d9c129f1c19560142:/src/w32console.c
diff --git a/src/w32console.c b/src/w32console.c
index 42d89cca6d..5a44d3748a 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -1,4 +1,4 @@
-/* Terminal hooks for GNU Emacs on the Microsoft W32 API.
+/* Terminal hooks for GNU Emacs on the Microsoft Windows API.
Copyright (C) 1992, 1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -26,7 +26,6 @@ along with GNU Emacs. If not, see . */
#include
#include
-#include
#include "lisp.h"
#include "character.h"
@@ -37,6 +36,8 @@ along with GNU Emacs. If not, see . */
#include "termhooks.h"
#include "termchar.h"
#include "dispextern.h"
+#include "w32term.h"
+#include "w32heap.h" /* for os_subtype */
#include "w32inevt.h"
/* from window.c */
@@ -67,6 +68,7 @@ static CONSOLE_CURSOR_INFO prev_console_cursor;
#endif
HANDLE keyboard_handle;
+int w32_console_unicode_input;
/* Setting this as the ctrl handler prevents emacs from being killed when
@@ -429,53 +431,6 @@ w32con_delete_glyphs (struct frame *f, int n)
scroll_line (f, n, LEFT);
}
-static unsigned int sound_type = 0xFFFFFFFF;
-#define MB_EMACS_SILENT (0xFFFFFFFF - 1)
-
-void
-w32_sys_ring_bell (struct frame *f)
-{
- if (sound_type == 0xFFFFFFFF)
- {
- Beep (666, 100);
- }
- else if (sound_type == MB_EMACS_SILENT)
- {
- /* Do nothing. */
- }
- else
- MessageBeep (sound_type);
-}
-
-DEFUN ("set-message-beep", Fset_message_beep, Sset_message_beep, 1, 1, 0,
- doc: /* Set the sound generated when the bell is rung.
-SOUND is 'asterisk, 'exclamation, 'hand, 'question, 'ok, or 'silent
-to use the corresponding system sound for the bell. The 'silent sound
-prevents Emacs from making any sound at all.
-SOUND is nil to use the normal beep. */)
- (Lisp_Object sound)
-{
- CHECK_SYMBOL (sound);
-
- if (NILP (sound))
- sound_type = 0xFFFFFFFF;
- else if (EQ (sound, intern ("asterisk")))
- sound_type = MB_ICONASTERISK;
- else if (EQ (sound, intern ("exclamation")))
- sound_type = MB_ICONEXCLAMATION;
- else if (EQ (sound, intern ("hand")))
- sound_type = MB_ICONHAND;
- else if (EQ (sound, intern ("question")))
- sound_type = MB_ICONQUESTION;
- else if (EQ (sound, intern ("ok")))
- sound_type = MB_OK;
- else if (EQ (sound, intern ("silent")))
- sound_type = MB_EMACS_SILENT;
- else
- sound_type = 0xFFFFFFFF;
-
- return sound;
-}
static void
w32con_reset_terminal_modes (struct terminal *t)
@@ -513,7 +468,7 @@ w32con_set_terminal_modes (struct terminal *t)
{
CONSOLE_CURSOR_INFO cci;
- /* make cursor big and visible (100 on Win95 makes it disappear) */
+ /* make cursor big and visible (100 on Windows 95 makes it disappear) */
cci.dwSize = 99;
cci.bVisible = TRUE;
(void) SetConsoleCursorInfo (cur_screen, &cci);
@@ -786,6 +741,11 @@ initialize_w32_display (struct terminal *term)
info.srWindow.Left);
}
+ if (os_subtype == OS_NT)
+ w32_console_unicode_input = 1;
+ else
+ w32_console_unicode_input = 0;
+
/* Setup w32_display_info structure for this frame. */
w32_initialize_display_info (build_string ("Console"));
@@ -844,5 +804,4 @@ scroll-back buffer. */);
defsubr (&Sset_screen_color);
defsubr (&Sget_screen_color);
defsubr (&Sset_cursor_size);
- defsubr (&Sset_message_beep);
}