mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-15 15:50:57 -08:00
(make_lispy_event) [HAVE_X_WINDOWS]: If we know
that EVENT->code isn't a function key, use the keysym's name. Use SYMBOL_VALUE/SET_SYMBOL_VALUE macros instead of accessing symbols' value directly.
This commit is contained in:
parent
19cebf5a64
commit
656280a67e
1 changed files with 30 additions and 7 deletions
|
|
@ -4688,12 +4688,35 @@ make_lispy_event (event)
|
|||
/ sizeof (iso_lispy_function_keys[0])));
|
||||
else
|
||||
#endif
|
||||
return modify_event_symbol (event->code - FUNCTION_KEY_OFFSET,
|
||||
event->modifiers,
|
||||
Qfunction_key, Qnil,
|
||||
lispy_function_keys, &func_key_syms,
|
||||
(sizeof (lispy_function_keys)
|
||||
/ sizeof (lispy_function_keys[0])));
|
||||
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
if (event->code - FUNCTION_KEY_OFFSET < 0
|
||||
|| (event->code - FUNCTION_KEY_OFFSET
|
||||
>= sizeof lispy_function_keys / sizeof *lispy_function_keys))
|
||||
{
|
||||
/* EVENT->code is an unknown keysym, for example someone
|
||||
assigned `ccaron' to a key in a locale where
|
||||
XmbLookupString doesn't return a translation for it. */
|
||||
char *name;
|
||||
Lisp_Object symbol;
|
||||
|
||||
BLOCK_INPUT;
|
||||
/* This returns a pointer to a static area. Don't free it. */
|
||||
name = XKeysymToString (event->code);
|
||||
symbol = name ? intern (name) : Qnil;
|
||||
UNBLOCK_INPUT;
|
||||
|
||||
if (!NILP (symbol))
|
||||
return apply_modifiers (event->modifiers, symbol);
|
||||
}
|
||||
#endif /* HAVE_X_WINDOWS */
|
||||
|
||||
return modify_event_symbol (event->code - FUNCTION_KEY_OFFSET,
|
||||
event->modifiers,
|
||||
Qfunction_key, Qnil,
|
||||
lispy_function_keys, &func_key_syms,
|
||||
(sizeof (lispy_function_keys)
|
||||
/ sizeof (lispy_function_keys[0])));
|
||||
|
||||
#ifdef HAVE_MOUSE
|
||||
/* A mouse click. Figure out where it is, decide whether it's
|
||||
|
|
@ -10717,7 +10740,7 @@ This is measured in microseconds.");
|
|||
"Normal hook run when clearing the echo area.");
|
||||
#endif
|
||||
Qecho_area_clear_hook = intern ("echo-area-clear-hook");
|
||||
XSYMBOL (Qecho_area_clear_hook)->value = Qnil;
|
||||
SET_SYMBOL_VALUE (Qecho_area_clear_hook, Qnil);
|
||||
|
||||
DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag,
|
||||
"t means menu bar, specified Lucid style, needs to be recomputed.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue