Mercurial > emacs
changeset 48145:afa06e8da62c
(XTread_socket): Check Lisp types for Vx_keysym_table
and fix C types.
author | Dave Love <fx@gnu.org> |
---|---|
date | Mon, 04 Nov 2002 14:29:04 +0000 |
parents | a4a0068ad95b |
children | b35ced393e6c |
files | src/xterm.c |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xterm.c Mon Nov 04 08:21:51 2002 +0000 +++ b/src/xterm.c Mon Nov 04 14:29:04 2002 +0000 @@ -10758,14 +10758,15 @@ numchars--; } /* Now non-ASCII. */ - else if (! EQ ((c = Fgethash (make_number (keysym), - Vx_keysym_table, Qnil)), - Qnil)) + else if (HASH_TABLE_P (Vx_keysym_table) + && (NATNUMP (c = Fgethash (make_number (keysym), + Vx_keysym_table, + Qnil)))) { - bufp->kind = (SINGLE_BYTE_CHAR_P (c) + bufp->kind = (SINGLE_BYTE_CHAR_P (XFASTINT (c)) ? ASCII_KEYSTROKE_EVENT : MULTIBYTE_CHAR_KEYSTROKE_EVENT); - bufp->code = c; + bufp->code = XFASTINT (c); XSETFRAME (bufp->frame_or_window, f); bufp->arg = Qnil; bufp->modifiers