aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c37
1 files changed, 30 insertions, 7 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index c3847bf1451..9f1a7b38ea6 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -4688,12 +4688,35 @@ make_lispy_event (event)
4688 / sizeof (iso_lispy_function_keys[0]))); 4688 / sizeof (iso_lispy_function_keys[0])));
4689 else 4689 else
4690#endif 4690#endif
4691 return modify_event_symbol (event->code - FUNCTION_KEY_OFFSET, 4691
4692 event->modifiers, 4692#ifdef HAVE_X_WINDOWS
4693 Qfunction_key, Qnil, 4693 if (event->code - FUNCTION_KEY_OFFSET < 0
4694 lispy_function_keys, &func_key_syms, 4694 || (event->code - FUNCTION_KEY_OFFSET
4695 (sizeof (lispy_function_keys) 4695 >= sizeof lispy_function_keys / sizeof *lispy_function_keys))
4696 / sizeof (lispy_function_keys[0]))); 4696 {
4697 /* EVENT->code is an unknown keysym, for example someone
4698 assigned `ccaron' to a key in a locale where
4699 XmbLookupString doesn't return a translation for it. */
4700 char *name;
4701 Lisp_Object symbol;
4702
4703 BLOCK_INPUT;
4704 /* This returns a pointer to a static area. Don't free it. */
4705 name = XKeysymToString (event->code);
4706 symbol = name ? intern (name) : Qnil;
4707 UNBLOCK_INPUT;
4708
4709 if (!NILP (symbol))
4710 return apply_modifiers (event->modifiers, symbol);
4711 }
4712#endif /* HAVE_X_WINDOWS */
4713
4714 return modify_event_symbol (event->code - FUNCTION_KEY_OFFSET,
4715 event->modifiers,
4716 Qfunction_key, Qnil,
4717 lispy_function_keys, &func_key_syms,
4718 (sizeof (lispy_function_keys)
4719 / sizeof (lispy_function_keys[0])));
4697 4720
4698#ifdef HAVE_MOUSE 4721#ifdef HAVE_MOUSE
4699 /* A mouse click. Figure out where it is, decide whether it's 4722 /* A mouse click. Figure out where it is, decide whether it's
@@ -10717,7 +10740,7 @@ This is measured in microseconds.");
10717 "Normal hook run when clearing the echo area."); 10740 "Normal hook run when clearing the echo area.");
10718#endif 10741#endif
10719 Qecho_area_clear_hook = intern ("echo-area-clear-hook"); 10742 Qecho_area_clear_hook = intern ("echo-area-clear-hook");
10720 XSYMBOL (Qecho_area_clear_hook)->value = Qnil; 10743 SET_SYMBOL_VALUE (Qecho_area_clear_hook, Qnil);
10721 10744
10722 DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag, 10745 DEFVAR_LISP ("lucid-menu-bar-dirty-flag", &Vlucid_menu_bar_dirty_flag,
10723 "t means menu bar, specified Lucid style, needs to be recomputed."); 10746 "t means menu bar, specified Lucid style, needs to be recomputed.");