Mercurial > emacs
changeset 6134:c656768172d2
(update_menu_bar): Change call to menu_bar_items.
(display_menu_bar): Use FRAME_MENU_BAR_LINES as vector.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 02 Mar 1994 04:04:54 +0000 |
parents | 752d4237f869 |
children | bfe9f873bd64 |
files | src/xdisp.c |
diffstat | 1 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Wed Mar 02 03:47:51 1994 +0000 +++ b/src/xdisp.c Wed Mar 02 04:04:54 1994 +0000 @@ -969,7 +969,7 @@ { struct buffer *prev = current_buffer; current_buffer = XBUFFER (w->buffer); - FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (); + FRAME_MENU_BAR_ITEMS (f) = menu_bar_items (FRAME_MENU_BAR_ITEMS (f)); current_buffer = prev; #ifdef USE_X_TOOLKIT set_frame_menubar (f); @@ -2388,6 +2388,7 @@ register FRAME_PTR f = XFRAME (WINDOW_FRAME (w)); int maxendcol = FRAME_WIDTH (f); int hpos = 0; + int i; #ifndef USE_X_TOOLKIT if (FRAME_MENU_BAR_LINES (f) <= 0) @@ -2395,14 +2396,15 @@ get_display_line (f, vpos, 0); - for (tail = FRAME_MENU_BAR_ITEMS (f); CONSP (tail); tail = XCONS (tail)->cdr) + items = FRAME_MENU_BAR_ITEMS (f); + for (i = 0; i < XVECTOR (items)->size; i += 3) { - Lisp_Object string; - - string = XCONS (XCONS (XCONS (tail)->car)->cdr)->car; - - /* Record in each item its hpos. */ - XFASTINT (XCONS (XCONS (XCONS (tail)->car)->cdr)->cdr) = hpos; + Lisp_Object pos, string; + string = XVECTOR (items)->contents[i + 1]; + if (NILP (string)) + break; + + XFASTINT (XVECTOR (items)->contents[i + 2]) = hpos; if (hpos < maxendcol) hpos = display_string (XWINDOW (FRAME_ROOT_WINDOW (f)), vpos,