Mercurial > emacs
changeset 2512:2a13ec10bfd7
* keyboard.c (command_loop_1): Rebuild menu bar if
update_mode_lines is set.
Since Qmenu_enable is used by non-X-specific code, it shouldn't be
defined in an X-only source file.
* xmenu.c (Qmenu_enable): Definition moved...
(syms_of_xmenu): ... along with initialization ...
* keyboard.c (Qmenu_enable): ... to here ...
(syms_of_keyboard): ... and here.
* keyboard.c (kbd_buffer_get_event): If we get a selection clear
or selection request event, but we were compiled without the
window-system-specific code to handle it, abort. Don't try to
call a function which doesn't exist.
* keyboard.c (make_lispy_event): In the code which processes mouse
clicks, declare f to be a FRAME_PTR, not a struct frame *; this
works when MULTI_FRAME is not #defined.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 10 Apr 1993 08:02:22 +0000 |
parents | 4fc5338ebb8f |
children | d93605655958 |
files | src/keyboard.c |
diffstat | 1 files changed, 27 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Sat Apr 10 08:00:27 1993 +0000 +++ b/src/keyboard.c Sat Apr 10 08:02:22 1993 +0000 @@ -354,7 +354,6 @@ /* Symbols to head events. */ Lisp_Object Qmouse_movement; Lisp_Object Qscroll_bar_movement; - Lisp_Object Qswitch_frame; /* Symbols to denote kinds of events. */ @@ -366,6 +365,8 @@ Lisp_Object Qevent_kind; Lisp_Object Qevent_symbol_elements; +Lisp_Object Qmenu_enable; + /* An event header symbol HEAD may have a property named Qevent_symbol_element_mask, which is of the form (BASE MODIFIERS); BASE is the base, unmodified version of HEAD, and MODIFIERS is the @@ -945,7 +946,16 @@ { struct frame *f = XFRAME (XCONS (tem)->car); struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f)); + + /* If the user has switched buffers or windows, we need to + recompute to reflect the new bindings. But we'll + recompute when update_mode_lines is set too; that means + that people can use force-mode-line-update to request + that the menu bar be recomputed. The adverse effect on + the rest of the redisplay algorithm is about the same as + windows_or_buffers_changed anyway. */ if (windows_or_buffers_changed + || update_mode_lines || (XFASTINT (w->last_modified) < MODIFF && (XFASTINT (w->last_modified) <= XBUFFER (w->buffer)->save_modified))) @@ -1781,16 +1791,28 @@ and don't actually appear to the command loop. */ if (event->kind == selection_request_event) { +#ifdef HAVE_X11 x_handle_selection_request (event); kbd_fetch_ptr = event + 1; goto retry; +#else + /* We're getting selection request events, but we don't have + a window system. */ + abort (); +#endif } if (event->kind == selection_clear_event) { +#ifdef HAVE_X11 x_handle_selection_clear (event); kbd_fetch_ptr = event + 1; goto retry; +#else + /* We're getting selection request events, but we don't have + a window system. */ + abort (); +#endif } #ifdef MULTI_FRAME @@ -2076,7 +2098,7 @@ if (event->kind == mouse_click) { int part; - struct frame *f = XFRAME (event->frame_or_window); + FRAME_PTR f = XFRAME (event->frame_or_window); Lisp_Object window = window_from_coordinates (f, XINT (event->x), XINT (event->y), &part); @@ -4545,6 +4567,9 @@ Qmouse_click = intern ("mouse-click"); staticpro (&Qmouse_click); + Qmenu_enable = intern ("menu-enable"); + staticpro (&Qmenu_enable); + Qmode_line = intern ("mode-line"); staticpro (&Qmode_line); Qvertical_line = intern ("vertical-line");