From: Miles Bader Date: Fri, 24 Nov 2000 06:32:05 +0000 (+0000) Subject: (display_menu_bar, display_mode_line): Change the way we X-Git-Tag: emacs-pretest-21.0.92~104 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1862a24e48a6c85a9821c3a82441a5f5e3b94c69;p=emacs.git (display_menu_bar, display_mode_line): Change the way we apply `mode-line-inverse-video' -- zero means force display using the default face, non-zero means display using the specialized face. (syms_of_xdisp): `mode-line-inverse-video' defaults to true again. --- diff --git a/src/ChangeLog b/src/ChangeLog index e35afd78903..521446ab530 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2000-11-24 Miles Bader + + * xdisp.c (display_menu_bar, display_mode_line): Change the way we + apply `mode-line-inverse-video' -- zero means force display using + the default face, non-zero means display using the specialized face. + (syms_of_xdisp): `mode-line-inverse-video' defaults to true again. + 2000-11-23 Kenichi Handa * alloc.c (Fmake_string): Use MAX_MULTIBYTE_LENGTH, instead of diff --git a/src/xdisp.c b/src/xdisp.c index d5c54ade6d4..8d5d2b6b6f6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -398,7 +398,11 @@ int buffer_shared; static Lisp_Object default_invis_vector[3]; -/* Nonzero means display mode line highlighted. */ +/* Zero means display the mode-line/header-line/menu-bar in the default face + (this slightly odd definition is for compatibility with previous versions + of emacs), non-zero means display them using their respective faces. + + This variable is deprecated. */ int mode_line_inverse_video; @@ -12314,6 +12318,10 @@ display_menu_bar (w) } #endif /* not USE_X_TOOLKIT */ + if (! mode_line_inverse_video) + /* Force the menu-bar to be displayed in the default face. */ + it.base_face_id = it.face_id = DEFAULT_FACE_ID; + /* Clear all rows of the menu bar. */ for (i = 0; i < FRAME_MENU_BAR_LINES (f); ++i) { @@ -12323,10 +12331,6 @@ display_menu_bar (w) row->full_width_p = 1; } - /* Make the first line of the menu bar appear in reverse video. */ - if (mode_line_inverse_video) - it.glyph_row->inverse_p = 1; - /* Display all items of the menu bar. */ items = FRAME_MENU_BAR_ITEMS (it.f); for (i = 0; i < XVECTOR (items)->size; i += 4) @@ -12481,6 +12485,10 @@ display_mode_line (w, face_id, format) init_iterator (&it, w, -1, -1, NULL, face_id); prepare_desired_row (it.glyph_row); + if (! mode_line_inverse_video) + /* Force the mode-line to be displayed in the default face. */ + it.base_face_id = it.face_id = DEFAULT_FACE_ID; + /* Temporarily make frame's keyboard the current kboard so that kboard-local variables in the mode_line_format will get the right values. */ @@ -12494,7 +12502,7 @@ display_mode_line (w, face_id, format) compute_line_metrics (&it); it.glyph_row->full_width_p = 1; it.glyph_row->mode_line_p = 1; - it.glyph_row->inverse_p = mode_line_inverse_video != 0; + it.glyph_row->inverse_p = 0; it.glyph_row->continued_p = 0; it.glyph_row->truncated_on_left_p = 0; it.glyph_row->truncated_on_right_p = 0; @@ -13808,10 +13816,12 @@ of the top or bottom of the window."); truncate_partial_width_windows = 1; DEFVAR_BOOL ("mode-line-inverse-video", &mode_line_inverse_video, - "Non-nil means use inverse video for the mode line.\n\ + "nil means display the mode-line/header-line/menu-bar in the default face.\n\ +Any other value means to use the appropriate face, `mode-line',\n\ +`header-line', or `menu' respectively.\n\ \n\ -This variable is deprecated; please use the face `mode-line' instead."); - mode_line_inverse_video = 0; +This variable is deprecated; please change the above faces instead."); + mode_line_inverse_video = 1; DEFVAR_LISP ("line-number-display-limit", &Vline_number_display_limit, "*Maximum buffer size for which line number should be displayed.\n\