diff options
author | Karl Heuer <kwzh@gnu.org> | 1995-06-09 16:00:45 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1995-06-09 16:00:45 +0000 |
commit | 399164b4b3385b7f86b31f27789ab1010d4f5029 (patch) | |
tree | 62f9d143fc11919e69c3128a8b3c696cad760849 /src/xdisp.c | |
parent | 363e6c4033ffc549f3cf739d7ebd8bd9336a778c (diff) | |
download | emacs-399164b4b3385b7f86b31f27789ab1010d4f5029.tar.gz emacs-399164b4b3385b7f86b31f27789ab1010d4f5029.tar.bz2 emacs-399164b4b3385b7f86b31f27789ab1010d4f5029.zip |
(update_menu_bar): Use set_buffer_internal_1 to switch bufs.
Run the hooks in the proper buffer.
Normally bind overriding-local-map to nil.
(Qoverriding_local_map): New variable.
(syms_of_xdisp): staticpro it.
Diffstat (limited to 'src/xdisp.c')
-rw-r--r-- | src/xdisp.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 8d3a6321f30..9f1353d2025 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -45,6 +45,11 @@ extern int command_loop_level; extern Lisp_Object Qface; +extern Lisp_Object Voverriding_local_map; +extern Lisp_Object Voverriding_local_map_menu_flag; + +Lisp_Object Qoverriding_local_map; + /* Nonzero means print newline to stdout before next minibuffer message. */ int noninteractive_need_newline; @@ -1259,8 +1264,11 @@ update_menu_bar (f, save_match_data) struct buffer *prev = current_buffer; int count = specpdl_ptr - specpdl; + set_buffer_internal_1 (XBUFFER (w->buffer)); if (save_match_data) record_unwind_protect (Fstore_match_data, Fmatch_data ()); + if (NILP (Voverriding_local_map_menu_flag)) + specbind (Qoverriding_local_map, Qnil); /* Run the Lucid hook. */ call1 (Vrun_hooks, Qactivate_menubar_hook); @@ -1269,14 +1277,13 @@ update_menu_bar (f, save_match_data) if (! NILP (Vlucid_menu_bar_dirty_flag)) call0 (Qrecompute_lucid_menubar); call1 (Vrun_hooks, Qmenu_bar_update_hook); - current_buffer = XBUFFER (w->buffer); FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f)); #ifdef USE_X_TOOLKIT set_frame_menubar (f, 0); #endif /* USE_X_TOOLKIT */ - current_buffer = prev; unbind_to (count, Qnil); + set_buffer_internal_1 (prev); } } } @@ -4050,6 +4057,9 @@ syms_of_xdisp () staticpro (&Qmenu_bar_update_hook); Qmenu_bar_update_hook = intern ("menu-bar-update-hook"); + staticpro (&Qoverriding_local_map); + Qoverriding_local_map = intern ("overriding-local-map"); + staticpro (&last_arrow_position); staticpro (&last_arrow_string); last_arrow_position = Qnil; |