# HG changeset patch # User Stefan Monnier # Date 1195142580 0 # Node ID 48dc79c663f449b036e5270e664ac9ada05eb087 # Parent 388dd3c79510e3317b269403e24986ab74a647ec * subr.el (event-modifiers): Use internal-event-symbol-parse-modifiers. * keyboard.c (Fevent_symbol_parse_modifiers): New function. (syms_of_keyboard): Defsubr it. diff -r 388dd3c79510 -r 48dc79c663f4 lisp/ChangeLog --- a/lisp/ChangeLog Thu Nov 15 15:40:20 2007 +0000 +++ b/lisp/ChangeLog Thu Nov 15 16:03:00 2007 +0000 @@ -1,5 +1,7 @@ 2007-11-15 Stefan Monnier + * subr.el (event-modifiers): Use internal-event-symbol-parse-modifiers. + * pcvs.el (cvs-revert-if-needed): Ignore `unknown' files, since cvs did not touch them. diff -r 388dd3c79510 -r 48dc79c663f4 lisp/subr.el --- a/lisp/subr.el Thu Nov 15 15:40:20 2007 +0000 +++ b/lisp/subr.el Thu Nov 15 16:03:00 2007 +0000 @@ -723,7 +723,9 @@ (if (listp type) (setq type (car type))) (if (symbolp type) - (cdr (get type 'event-symbol-elements)) + ;; Don't read event-symbol-elements directly since we're not + ;; sure the symbol has already been parsed. + (cdr (internal-event-symbol-parse-modifiers type)) (let ((list nil) (char (logand type (lognot (logior ?\M-\^@ ?\C-\^@ ?\S-\^@ ?\H-\^@ ?\s-\^@ ?\A-\^@))))) diff -r 388dd3c79510 -r 48dc79c663f4 src/ChangeLog --- a/src/ChangeLog Thu Nov 15 15:40:20 2007 +0000 +++ b/src/ChangeLog Thu Nov 15 16:03:00 2007 +0000 @@ -1,5 +1,8 @@ 2007-11-15 Stefan Monnier + * keyboard.c (Fevent_symbol_parse_modifiers): New function. + (syms_of_keyboard): Defsubr it. + * data.c (swap_in_global_binding): Fix longstanding bug where store_symval_forwarding was not called with the right second argument, thus causing objfwd-ing from being dropped. diff -r 388dd3c79510 -r 48dc79c663f4 src/keyboard.c --- 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);