summaryrefslogtreecommitdiff
path: root/src/w32fns.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-12-16 04:31:49 +0000
committerMiles Bader <miles@gnu.org>2007-12-16 04:31:49 +0000
commit47854a55680b5809811caf72f66ecbe8289c2855 (patch)
treeb980b3347185be466df5cef9ef3eaf0959ce170a /src/w32fns.c
parentbbbe940b6d5834189ea6d48d70a2e8f113cf53e9 (diff)
parenta2586785fb5d84e457a4489cfbc3d6d604c1d410 (diff)
downloademacs-47854a55680b5809811caf72f66ecbe8289c2855.tar.gz
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-956
Diffstat (limited to 'src/w32fns.c')
-rw-r--r--src/w32fns.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 491ccedeb13..0c5bd1e4cc3 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2957,7 +2957,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
they don't produce WM_CHAR messages). This ensures that
indicator lights are toggled promptly on Windows 9x, for
example. */
- if (lispy_function_keys[wParam] != 0)
+ if (wParam < 256 && lispy_function_keys[wParam])
{
windows_translate = 1;
goto translate;
@@ -3079,7 +3079,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
break;
default:
/* If not defined as a function key, change it to a WM_CHAR message. */
- if (lispy_function_keys[wParam] == 0)
+ if (wParam > 255 || !lispy_function_keys[wParam])
{
DWORD modifiers = construct_console_modifiers ();
@@ -8159,7 +8159,7 @@ lookup_vk_code (char *key)
int i;
for (i = 0; i < 256; i++)
- if (lispy_function_keys[i] != 0
+ if (lispy_function_keys[i]
&& strcmp (lispy_function_keys[i], key) == 0)
return i;
@@ -8337,7 +8337,7 @@ usage: (w32-reconstruct-hot-key ID) */)
vk_code = HOTKEY_VK_CODE (hotkeyid);
w32_modifiers = HOTKEY_MODIFIERS (hotkeyid);
- if (lispy_function_keys[vk_code])
+ if (vk_code < 256 && lispy_function_keys[vk_code])
key = intern (lispy_function_keys[vk_code]);
else
key = make_number (vk_code);