diff options
| author | Stefan Monnier | 2007-11-15 16:03:00 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-11-15 16:03:00 +0000 |
| commit | 58da34c73b6fb576474c73c29dfc9cf1a9e9751e (patch) | |
| tree | 7756bae639e70c8b3049f6e34cec61308537d51c | |
| parent | 21e1464132e49b38ba58a944a2183006c309124f (diff) | |
| download | emacs-58da34c73b6fb576474c73c29dfc9cf1a9e9751e.tar.gz emacs-58da34c73b6fb576474c73c29dfc9cf1a9e9751e.zip | |
* subr.el (event-modifiers): Use internal-event-symbol-parse-modifiers.
* keyboard.c (Fevent_symbol_parse_modifiers): New function.
(syms_of_keyboard): Defsubr it.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/subr.el | 4 | ||||
| -rw-r--r-- | src/ChangeLog | 3 | ||||
| -rw-r--r-- | src/keyboard.c | 14 |
4 files changed, 22 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f39752b4e18..baf66e2007a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2007-11-15 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2007-11-15 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * subr.el (event-modifiers): Use internal-event-symbol-parse-modifiers. | ||
| 4 | |||
| 3 | * pcvs.el (cvs-revert-if-needed): Ignore `unknown' files, since cvs | 5 | * pcvs.el (cvs-revert-if-needed): Ignore `unknown' files, since cvs |
| 4 | did not touch them. | 6 | did not touch them. |
| 5 | 7 | ||
diff --git a/lisp/subr.el b/lisp/subr.el index 17abc70e073..39bd8ea13c2 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -723,7 +723,9 @@ even when EVENT actually has modifiers." | |||
| 723 | (if (listp type) | 723 | (if (listp type) |
| 724 | (setq type (car type))) | 724 | (setq type (car type))) |
| 725 | (if (symbolp type) | 725 | (if (symbolp type) |
| 726 | (cdr (get type 'event-symbol-elements)) | 726 | ;; Don't read event-symbol-elements directly since we're not |
| 727 | ;; sure the symbol has already been parsed. | ||
| 728 | (cdr (internal-event-symbol-parse-modifiers type)) | ||
| 727 | (let ((list nil) | 729 | (let ((list nil) |
| 728 | (char (logand type (lognot (logior ?\M-\^@ ?\C-\^@ ?\S-\^@ | 730 | (char (logand type (lognot (logior ?\M-\^@ ?\C-\^@ ?\S-\^@ |
| 729 | ?\H-\^@ ?\s-\^@ ?\A-\^@))))) | 731 | ?\H-\^@ ?\s-\^@ ?\A-\^@))))) |
diff --git a/src/ChangeLog b/src/ChangeLog index f4f63e3c4d9..8ee1649afd9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2007-11-15 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2007-11-15 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * keyboard.c (Fevent_symbol_parse_modifiers): New function. | ||
| 4 | (syms_of_keyboard): Defsubr it. | ||
| 5 | |||
| 3 | * data.c (swap_in_global_binding): Fix longstanding bug where | 6 | * data.c (swap_in_global_binding): Fix longstanding bug where |
| 4 | store_symval_forwarding was not called with the right second argument, | 7 | store_symval_forwarding was not called with the right second argument, |
| 5 | thus causing objfwd-ing from being dropped. | 8 | thus causing objfwd-ing from being dropped. |
diff --git a/src/keyboard.c b/src/keyboard.c index 64504535dd3..41407b5f626 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -6545,6 +6545,19 @@ parse_modifiers (symbol) | |||
| 6545 | } | 6545 | } |
| 6546 | } | 6546 | } |
| 6547 | 6547 | ||
| 6548 | DEFUN ("internal-event-symbol-parse-modifiers", Fevent_symbol_parse_modifiers, | ||
| 6549 | Sevent_symbol_parse_modifiers, 1, 1, 0, | ||
| 6550 | doc: /* Parse the event symbol. For internal use. */) | ||
| 6551 | (symbol) | ||
| 6552 | { | ||
| 6553 | /* Fill the cache if needed. */ | ||
| 6554 | parse_modifiers (symbol); | ||
| 6555 | /* Ignore the result (which is stored on Qevent_symbol_element_mask) | ||
| 6556 | and use the Lispier representation stored on Qevent_symbol_elements | ||
| 6557 | instead. */ | ||
| 6558 | return Fget (symbol, Qevent_symbol_elements); | ||
| 6559 | } | ||
| 6560 | |||
| 6548 | /* Apply the modifiers MODIFIERS to the symbol BASE. | 6561 | /* Apply the modifiers MODIFIERS to the symbol BASE. |
| 6549 | BASE must be unmodified. | 6562 | BASE must be unmodified. |
| 6550 | 6563 | ||
| @@ -11946,6 +11959,7 @@ syms_of_keyboard () | |||
| 11946 | staticpro (&help_form_saved_window_configs); | 11959 | staticpro (&help_form_saved_window_configs); |
| 11947 | 11960 | ||
| 11948 | defsubr (&Scurrent_idle_time); | 11961 | defsubr (&Scurrent_idle_time); |
| 11962 | defsubr (&Sevent_symbol_parse_modifiers); | ||
| 11949 | defsubr (&Sevent_convert_list); | 11963 | defsubr (&Sevent_convert_list); |
| 11950 | defsubr (&Sread_key_sequence); | 11964 | defsubr (&Sread_key_sequence); |
| 11951 | defsubr (&Sread_key_sequence_vector); | 11965 | defsubr (&Sread_key_sequence_vector); |