From afd8eb2cb062e63135812775e7377bc968ac28ee Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 8 Oct 2013 17:37:20 +0300 Subject: [PATCH] Cleanups and commentary changes. --- lisp/menu-bar.el | 2 -- src/term.c | 19 +------------------ src/xdisp.c | 16 ++++++++-------- 3 files changed, 9 insertions(+), 28 deletions(-) diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 71967e1474f..fe2d9caf10f 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -2395,8 +2395,6 @@ If FRAME is nil or not given, use the selected frame." ((eq type 'x) (x-menu-bar-open frame)) ((eq type 'w32) (w32-menu-bar-open frame)) ((null tty-menu-open-use-tmm) - ;; FIXME: This should open the leftmost menu, and let the user - ;; move to others via C-f or right-arrow. (let* ((x tty-menu--initial-menu-x) (menu (menu-bar-menu-at-x-y x 0 frame))) (popup-menu (or diff --git a/src/term.c b/src/term.c index 8515edf88a5..24add173245 100644 --- a/src/term.c +++ b/src/term.c @@ -3187,12 +3187,9 @@ read_menu_input (struct frame *sf, int *x, int *y, int min_y, int max_y, { *first_time = false; sf->mouse_moved = 1; - return 0; } - - while (1) + else { -#if 1 extern Lisp_Object read_menu_command (void); Lisp_Object cmd; int usable_input = 1; @@ -3247,17 +3244,6 @@ read_menu_input (struct frame *sf, int *x, int *y, int min_y, int max_y, usable_input = 0; if (usable_input) sf->mouse_moved = 1; -#else - int volatile dx = 0; - int volatile dy = 0; - int volatile st = 0; - - *x += dx; - *y += dy; - if (dx != 0 || dy != 0) - sf->mouse_moved = 1; - Sleep (300); -#endif return st; } return 0; @@ -3356,7 +3342,6 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, leave = 0; while (!leave) { - int mouse_button_count = 3; /* FIXME */ int input_status; int min_y = state[0].y, max_y = min_y + state[0].menu->count - 1; @@ -3457,8 +3442,6 @@ tty_menu_activate (tty_menu *menu, int *pane, int *selidx, } sf->mouse_moved = 0; - /* FIXME: Since we set the fram's garbaged flag, do we need this - call to screen_update? */ screen_update (sf, state[0].screen_behind); while (statecount--) free_saved_screen (state[statecount].screen_behind); diff --git a/src/xdisp.c b/src/xdisp.c index ce6cd8f080e..9d7f5fadc78 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -20616,9 +20616,9 @@ deep_copy_glyph_row (struct glyph_row *to, struct glyph_row *from) } /* Display one menu item on a TTY, by overwriting the glyphs in the - desired glyph matrix with glyphs produced from the menu item text. - Called from term.c to display TTY drop-down menus one item at a - time. + frame F's desired glyph matrix with glyphs produced from the menu + item text. Called from term.c to display TTY drop-down menus one + item at a time. ITEM_TEXT is the menu item text as a C string. @@ -20626,11 +20626,11 @@ deep_copy_glyph_row (struct glyph_row *to, struct glyph_row *from) could specify one of 3 faces: a face for an enabled item, a face for a disabled item, or a face for a selected item. - X and Y are coordinates of the first glyph in the desired matrix to - be overwritten by the menu item. Since this is a TTY, Y is the - zero-based number of the glyph row and X is the zero-based glyph - number in the row, starting from left, where to start displaying - the item. + X and Y are coordinates of the first glyph in the frame's desired + matrix to be overwritten by the menu item. Since this is a TTY, Y + is the zero-based number of the glyph row and X is the zero-based + glyph number in the row, starting from left, where to start + displaying the item. SUBMENU non-zero means this menu item drops down a submenu, which should be indicated by displaying a proper visual cue after the -- 2.39.2