aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2002-02-11 14:42:56 +0000
committerKim F. Storm2002-02-11 14:42:56 +0000
commita4610492f1c49c13cfcdbd866cb1d0848c1381ac (patch)
tree16a842ade010d4f94a209d3c571bb38496c2c67e /src
parent26124d5e0300e9be59aef9d182227a958128271b (diff)
downloademacs-a4610492f1c49c13cfcdbd866cb1d0848c1381ac.tar.gz
emacs-a4610492f1c49c13cfcdbd866cb1d0848c1381ac.zip
(CURRENT_MODE_LINE_FACE_ID_3): New macro.
(CURRENT_MODE_LINE_FACE_ID): Use it. (Vmode_line_in_non_selected_windows): Declare extern.
Diffstat (limited to 'src')
-rw-r--r--src/dispextern.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 51da4ae0fff..ad8c70afe6b 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -923,13 +923,32 @@ extern struct glyph_row scratch_glyph_row;
923 ? MATRIX_HEADER_LINE_ROW (MATRIX)->height \ 923 ? MATRIX_HEADER_LINE_ROW (MATRIX)->height \
924 : 0) 924 : 0)
925 925
926/* Return the desired face id for the mode line of window W. 926/* Return the desired face id for the mode line of a window, depending
927 This depends on whether the window is selected or not. */ 927 on whether the window is selected or not, or if the window is the
928 scrolling window for the currently active minibuffer window.
929
930 Due to the way display_mode_lines manipulates with the contents of
931 selected_window, this macro needs three arguments: SELW which is
932 compared against the current value of selected_window, MBW which is
933 compared against minibuf_window (if SELW doesn't match), and SCRW
934 which is compared against Vminibuf_scroll_window (if MBW matches). */
935
936#define CURRENT_MODE_LINE_FACE_ID_3(SELW, MBW, SCRW) \
937 ((NILP (Vmode_line_in_non_selected_windows) \
938 || (SELW) == XWINDOW (selected_window) \
939 || (EQ (Vmode_line_in_non_selected_windows, Qt) \
940 && !NILP (Vminibuf_scroll_window) \
941 && minibuf_level \
942 && (MBW) == XWINDOW (minibuf_window) \
943 && (SCRW) == XWINDOW (Vminibuf_scroll_window))) \
944 ? MODE_LINE_FACE_ID \
945 : MODE_LINE_INACTIVE_FACE_ID)
946
947
948/* Return the desired face id for the mode line of window W. */
928 949
929#define CURRENT_MODE_LINE_FACE_ID(W) \ 950#define CURRENT_MODE_LINE_FACE_ID(W) \
930 ((W) == XWINDOW (selected_window) \ 951 (CURRENT_MODE_LINE_FACE_ID_3((W), XWINDOW (selected_window), (W)))
931 ? MODE_LINE_FACE_ID \
932 : MODE_LINE_INACTIVE_FACE_ID)
933 952
934/* Return the current height of the mode line of window W. If not 953/* Return the current height of the mode line of window W. If not
935 known from current_mode_line_height, look at W's current glyph 954 known from current_mode_line_height, look at W's current glyph
@@ -2227,6 +2246,7 @@ void highlight_trailing_whitespace P_ ((struct frame *, struct glyph_row *));
2227int tool_bar_item_info P_ ((struct frame *, struct glyph *, int *)); 2246int tool_bar_item_info P_ ((struct frame *, struct glyph *, int *));
2228extern Lisp_Object Qtool_bar; 2247extern Lisp_Object Qtool_bar;
2229extern Lisp_Object Vshow_trailing_whitespace; 2248extern Lisp_Object Vshow_trailing_whitespace;
2249extern Lisp_Object Vmode_line_in_non_selected_windows;
2230extern int redisplaying_p; 2250extern int redisplaying_p;
2231extern Lisp_Object Vimage_types; 2251extern Lisp_Object Vimage_types;
2232extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object)); 2252extern void add_to_log P_ ((char *, Lisp_Object, Lisp_Object));