diff options
| author | Gerd Moellmann | 2000-07-13 14:08:48 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-07-13 14:08:48 +0000 |
| commit | 9979315d68c82de6233ab815a92336b209b2646f (patch) | |
| tree | 55d0f563adf2c6c4c5a6a5ccb6d0767dc7864f2a /src | |
| parent | 9d94022598a31a566f8d050fd15e8cd83bdf7241 (diff) | |
| download | emacs-9979315d68c82de6233ab815a92336b209b2646f.tar.gz emacs-9979315d68c82de6233ab815a92336b209b2646f.zip | |
(menu_highlight_callback): Store help string in the
`arg' member of the input event; don't cons.
(menubar_selection_callback): Use the `arg' slot of input events
to queue additional information, instead of consing.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xmenu.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index a811d3b4d74..c84a6d7b332 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -1222,7 +1222,8 @@ menu_highlight_callback (widget, id, call_data) | |||
| 1222 | /* Store the help event. */ | 1222 | /* Store the help event. */ |
| 1223 | help = wv && wv->help ? build_string (wv->help) : Qnil; | 1223 | help = wv && wv->help ? build_string (wv->help) : Qnil; |
| 1224 | buf.kind = HELP_EVENT; | 1224 | buf.kind = HELP_EVENT; |
| 1225 | buf.frame_or_window = Fcons (frame, help); | 1225 | buf.frame_or_window = frame; |
| 1226 | buf.arg = help; | ||
| 1226 | kbd_buffer_store_event (&buf); | 1227 | kbd_buffer_store_event (&buf); |
| 1227 | } | 1228 | } |
| 1228 | 1229 | ||
| @@ -1280,27 +1281,31 @@ menubar_selection_callback (widget, id, client_data) | |||
| 1280 | Lisp_Object frame; | 1281 | Lisp_Object frame; |
| 1281 | 1282 | ||
| 1282 | XSETFRAME (frame, f); | 1283 | XSETFRAME (frame, f); |
| 1283 | buf.kind = menu_bar_event; | 1284 | buf.kind = MENU_BAR_EVENT; |
| 1284 | buf.frame_or_window = Fcons (frame, Fcons (Qmenu_bar, Qnil)); | 1285 | buf.frame_or_window = frame; |
| 1286 | buf.arg = frame; | ||
| 1285 | kbd_buffer_store_event (&buf); | 1287 | kbd_buffer_store_event (&buf); |
| 1286 | 1288 | ||
| 1287 | for (j = 0; j < submenu_depth; j++) | 1289 | for (j = 0; j < submenu_depth; j++) |
| 1288 | if (!NILP (subprefix_stack[j])) | 1290 | if (!NILP (subprefix_stack[j])) |
| 1289 | { | 1291 | { |
| 1290 | buf.kind = menu_bar_event; | 1292 | buf.kind = MENU_BAR_EVENT; |
| 1291 | buf.frame_or_window = Fcons (frame, subprefix_stack[j]); | 1293 | buf.frame_or_window = frame; |
| 1294 | buf.arg = subprefix_stack[j]; | ||
| 1292 | kbd_buffer_store_event (&buf); | 1295 | kbd_buffer_store_event (&buf); |
| 1293 | } | 1296 | } |
| 1294 | 1297 | ||
| 1295 | if (!NILP (prefix)) | 1298 | if (!NILP (prefix)) |
| 1296 | { | 1299 | { |
| 1297 | buf.kind = menu_bar_event; | 1300 | buf.kind = MENU_BAR_EVENT; |
| 1298 | buf.frame_or_window = Fcons (frame, prefix); | 1301 | buf.frame_or_window = frame; |
| 1302 | buf.arg = prefix; | ||
| 1299 | kbd_buffer_store_event (&buf); | 1303 | kbd_buffer_store_event (&buf); |
| 1300 | } | 1304 | } |
| 1301 | 1305 | ||
| 1302 | buf.kind = menu_bar_event; | 1306 | buf.kind = MENU_BAR_EVENT; |
| 1303 | buf.frame_or_window = Fcons (frame, entry); | 1307 | buf.frame_or_window = frame; |
| 1308 | buf.arg = entry; | ||
| 1304 | kbd_buffer_store_event (&buf); | 1309 | kbd_buffer_store_event (&buf); |
| 1305 | 1310 | ||
| 1306 | return; | 1311 | return; |