diff src/keyboard.c @ 86099:48dc79c663f4

* subr.el (event-modifiers): Use internal-event-symbol-parse-modifiers. * keyboard.c (Fevent_symbol_parse_modifiers): New function. (syms_of_keyboard): Defsubr it.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 15 Nov 2007 16:03:00 +0000
parents 70564a109512
children ebee80eef208
line wrap: on
line diff
--- a/src/keyboard.c	Thu Nov 15 15:40:20 2007 +0000
+++ b/src/keyboard.c	Thu Nov 15 16:03:00 2007 +0000
@@ -6545,6 +6545,19 @@
     }
 }
 
+DEFUN ("internal-event-symbol-parse-modifiers", Fevent_symbol_parse_modifiers,
+       Sevent_symbol_parse_modifiers, 1, 1, 0,
+       doc: /* Parse the event symbol.  For internal use.  */)
+  (symbol)
+{
+  /* Fill the cache if needed.  */
+  parse_modifiers (symbol);
+  /* Ignore the result (which is stored on Qevent_symbol_element_mask)
+     and use the Lispier representation stored on Qevent_symbol_elements
+     instead.  */
+  return Fget (symbol, Qevent_symbol_elements);
+}
+
 /* Apply the modifiers MODIFIERS to the symbol BASE.
    BASE must be unmodified.
 
@@ -11946,6 +11959,7 @@
   staticpro (&help_form_saved_window_configs);
 
   defsubr (&Scurrent_idle_time);
+  defsubr (&Sevent_symbol_parse_modifiers);
   defsubr (&Sevent_convert_list);
   defsubr (&Sread_key_sequence);
   defsubr (&Sread_key_sequence_vector);