mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-10 05:30:45 -08:00
(Vx_keysym_table): New.
(syms_of_xterm): Initialize it. (XTread_socket): Use it. From head: Eliminate incorrect optimization that tried to avoid decoding the output of X*LookupString. (x_get_font_repertory): Delete charset declaration.
This commit is contained in:
parent
91ed0599da
commit
a04ee8ea10
2 changed files with 34 additions and 15 deletions
|
|
@ -1,3 +1,12 @@
|
|||
2002-10-27 Dave Love <fx@gnu.org>
|
||||
|
||||
* term/x-win.el: Remove some ancient compatibility code. Populate
|
||||
x-keysym-table.
|
||||
|
||||
* international/mule-cmds.el (wid-edit): Require when compiling.
|
||||
(set-locale-environment): Check locale against coding system
|
||||
aliases too.
|
||||
|
||||
2002-10-25 Kenichi Handa <handa@m17n.org>
|
||||
|
||||
* language/indian.el (in-is13194-devanagari): Fix
|
||||
|
|
|
|||
40
src/xterm.c
40
src/xterm.c
|
|
@ -385,7 +385,7 @@ extern Lisp_Object Vcommand_line_args, Vsystem_name;
|
|||
|
||||
extern Lisp_Object Vx_no_window_manager;
|
||||
|
||||
extern Lisp_Object Qface, Qmouse_face;
|
||||
extern Lisp_Object Qface, Qmouse_face, Qeql;
|
||||
|
||||
extern int errno;
|
||||
|
||||
|
|
@ -396,6 +396,7 @@ extern int extra_keyboard_modifiers;
|
|||
/* The keysyms to use for the various modifiers. */
|
||||
|
||||
Lisp_Object Vx_alt_keysym, Vx_hyper_keysym, Vx_meta_keysym, Vx_super_keysym;
|
||||
Lisp_Object Vx_keysym_table;
|
||||
static Lisp_Object Qalt, Qhyper, Qmeta, Qsuper, Qmodifier_value;
|
||||
|
||||
static Lisp_Object Qvendor_specific_keysyms;
|
||||
|
|
@ -10641,11 +10642,25 @@ XTread_socket (sd, bufp, numchars, expected)
|
|||
#endif /* not HAVE_X11R5 */
|
||||
))
|
||||
{
|
||||
Lisp_Object c;
|
||||
|
||||
if (temp_index == sizeof temp_buffer / sizeof (short))
|
||||
temp_index = 0;
|
||||
temp_buffer[temp_index++] = keysym;
|
||||
bufp->kind = non_ascii_keystroke;
|
||||
bufp->code = keysym;
|
||||
if (! EQ ((c = Fgethash (make_number (keysym),
|
||||
Vx_keysym_table, Qnil)),
|
||||
Qnil))
|
||||
{
|
||||
bufp->kind = (ASCII_CHAR_P (c)
|
||||
? ascii_keystroke
|
||||
: multibyte_char_keystroke);
|
||||
bufp->code = c;
|
||||
}
|
||||
else
|
||||
{
|
||||
bufp->kind = non_ascii_keystroke;
|
||||
bufp->code = keysym;
|
||||
}
|
||||
XSETFRAME (bufp->frame_or_window, f);
|
||||
bufp->arg = Qnil;
|
||||
bufp->modifiers
|
||||
|
|
@ -10670,18 +10685,8 @@ XTread_socket (sd, bufp, numchars, expected)
|
|||
temp_buffer[temp_index++] = copy_bufptr[i];
|
||||
}
|
||||
|
||||
if (/* If the event is not from XIM, */
|
||||
event.xkey.keycode != 0
|
||||
/* or the current locale doesn't request
|
||||
decoding of the input data, ... */
|
||||
|| ! CODING_REQUIRE_DECODING (&coding))
|
||||
{
|
||||
/* ... we can use the input data as is. */
|
||||
nchars = nbytes;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We have to decode the input data. */
|
||||
/* Decode the input data. */
|
||||
coding.destination
|
||||
= (unsigned char *) malloc (nbytes);
|
||||
if (! coding.destination)
|
||||
|
|
@ -14490,7 +14495,6 @@ x_get_font_repertory (f, font_info)
|
|||
struct font_info *font_info;
|
||||
{
|
||||
XFontStruct *font = (XFontStruct *) font_info->font;
|
||||
struct charset *charset = CHARSET_FROM_ID (font_info->charset);
|
||||
Lisp_Object table;
|
||||
int min_byte1, max_byte1, min_byte2, max_byte2;
|
||||
|
||||
|
|
@ -15295,6 +15299,12 @@ For example, `super' means use the Super_L and Super_R keysyms. The
|
|||
default is nil, which is the same as `super'. */);
|
||||
Vx_super_keysym = Qnil;
|
||||
|
||||
DEFVAR_LISP ("x-keysym-table", &Vx_keysym_table,
|
||||
doc: /* Hash table of character codes indexed by X keysym codes. */);
|
||||
Vx_keysym_table = make_hash_table (Qeql, make_number (800),
|
||||
make_number (DEFAULT_REHASH_SIZE),
|
||||
make_number (DEFAULT_REHASH_THRESHOLD),
|
||||
Qnil, Qnil, Qnil);
|
||||
}
|
||||
|
||||
#endif /* HAVE_X_WINDOWS */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue