diff options
| author | Jim Blandy | 1992-10-03 03:03:45 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-10-03 03:03:45 +0000 |
| commit | 13b5e56c9bb513dfe03703790b99651746d563f9 (patch) | |
| tree | ffcd1eb3cc2c97d1cc407ca8834a3a15bce50d81 /src | |
| parent | 62c48f87e90d4b7ff89082c8b4e833d0804d00c1 (diff) | |
| download | emacs-13b5e56c9bb513dfe03703790b99651746d563f9.tar.gz emacs-13b5e56c9bb513dfe03703790b99651746d563f9.zip | |
* keyboard.c (modify_event_symbol): Make sure that the unmodified
event header gets the proper properties set on it, by recursing
and letting the same code build the properties for all event symbols.
* keyboard.c (Qmouse_click): Fix typo which assigned `mouse-click'
symbol to Qmouse_movement.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index d0b4b526a14..06fe85d6bb4 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -2109,25 +2109,6 @@ modify_event_symbol (symbol_num, modifiers, symbol_kind, name_table, | |||
| 2109 | 2109 | ||
| 2110 | /* We don't have an entry for the symbol; we have to build it. */ | 2110 | /* We don't have an entry for the symbol; we have to build it. */ |
| 2111 | 2111 | ||
| 2112 | /* Make sure there's an assoc for the unmodified symbol. | ||
| 2113 | Any non-empty alist should contain an entry for the unmodified symbol. */ | ||
| 2114 | XFASTINT (temp) = 0; | ||
| 2115 | |||
| 2116 | if (NILP (*slot)) | ||
| 2117 | { | ||
| 2118 | unmodified = intern (name_table [symbol_num]); | ||
| 2119 | *slot = Fcons (Fcons (temp, unmodified), Qnil); | ||
| 2120 | Fput (unmodified, Qevent_kind, symbol_kind); | ||
| 2121 | Fput (unmodified, Qevent_symbol_elements, Fcons (unmodified, Qnil)); | ||
| 2122 | } | ||
| 2123 | else | ||
| 2124 | { | ||
| 2125 | temp = Fassq (temp, *slot); | ||
| 2126 | if (NILP (temp)) | ||
| 2127 | abort (); | ||
| 2128 | unmodified = XCONS (temp)->cdr; | ||
| 2129 | } | ||
| 2130 | |||
| 2131 | /* Create a modified version of the symbol, and add it to the alist. */ | 2112 | /* Create a modified version of the symbol, and add it to the alist. */ |
| 2132 | { | 2113 | { |
| 2133 | Lisp_Object modified; | 2114 | Lisp_Object modified; |
| @@ -2153,8 +2134,27 @@ modify_event_symbol (symbol_num, modifiers, symbol_kind, name_table, | |||
| 2153 | modifier_list = Fcons (XVECTOR (modifier_symbols)->contents[i], | 2134 | modifier_list = Fcons (XVECTOR (modifier_symbols)->contents[i], |
| 2154 | modifier_list); | 2135 | modifier_list); |
| 2155 | 2136 | ||
| 2156 | Fput (modified, Qevent_symbol_elements, | 2137 | /* Put an unmodified version of the symbol at the head of the |
| 2157 | Fcons (unmodified, modifier_list)); | 2138 | list of symbol elements. */ |
| 2139 | { | ||
| 2140 | /* We recurse to get the unmodified symbol; this allows us to | ||
| 2141 | write out the code to build event headers only once. | ||
| 2142 | |||
| 2143 | Note that we put ourselves in the symbol_table before we | ||
| 2144 | recurse, so when an unmodified symbol calls this code | ||
| 2145 | to put itself on its Qevent_symbol_elements property, we do | ||
| 2146 | terminate. */ | ||
| 2147 | Lisp_Object unmodified = | ||
| 2148 | modify_event_symbol (symbol_num, | ||
| 2149 | ((modifiers & (down_modifier | drag_modifier)) | ||
| 2150 | ? click_modifier | ||
| 2151 | : 0), | ||
| 2152 | symbol_kind, | ||
| 2153 | name_table, symbol_table, table_size); | ||
| 2154 | |||
| 2155 | Fput (modified, Qevent_symbol_elements, | ||
| 2156 | Fcons (unmodified, modifier_list)); | ||
| 2157 | } | ||
| 2158 | } | 2158 | } |
| 2159 | 2159 | ||
| 2160 | return modified; | 2160 | return modified; |
| @@ -3607,7 +3607,7 @@ syms_of_keyboard () | |||
| 3607 | 3607 | ||
| 3608 | Qfunction_key = intern ("function-key"); | 3608 | Qfunction_key = intern ("function-key"); |
| 3609 | staticpro (&Qfunction_key); | 3609 | staticpro (&Qfunction_key); |
| 3610 | Qmouse_movement = intern ("mouse-click"); | 3610 | Qmouse_click = intern ("mouse-click"); |
| 3611 | staticpro (&Qmouse_click); | 3611 | staticpro (&Qmouse_click); |
| 3612 | Qmouse_movement = intern ("scrollbar-click"); | 3612 | Qmouse_movement = intern ("scrollbar-click"); |
| 3613 | staticpro (&Qmouse_movement); | 3613 | staticpro (&Qmouse_movement); |