Most windows do not have a header line---only some special modes, such
Info mode, create one.
+The @code{header-line-active} and @code{header-line-inactive} faces (which
+are the ones used on the header lines) inherit from this face.
+
+@item header-line-active
+@cindex faces for header lines
+Like @code{header-line}, but used for the header line of the currently
+selected window. This face inherits from @code{header-line}, so changes
+in that face affect header lines in all windows.
+
+@item header-line-inactive
+@cindex @code{header-line-inactive} face
+Like @code{header-line}, but used for header lines of the windows other
+than the selected one (if those windows have a header line). This face
+inherits from @code{header-line}, so changes in that face affect header
+lines in all windows.
+
@item header-line-highlight
@cindex @code{header-line-highlight} face
Similar to @code{highlight} and @code{mode-line-highlight}, but used
first argument. This is a way for the callers to indicate, for example,
the reason or the context why the project is asked for.
+** Registers
+
+*** New functions 'buffer-to-register' and 'file-to-register'.
+These allow users to interactively store file and buffers in registers.
+Killed buffers stored in a register using 'buffer-to-register' are
+automatically converted to a file-query value if the buffer was visiting
+a file.
+
+** IDLWAVE has been moved to GNU ELPA.
+The version bundled with Emacs is out-of-date, and is now marked as
+obsolete. Use 'M-x list-packages' to install the 'idlwave' package from
+GNU ELPA instead.
+
++++
+** New face 'header-line-active'.
+This inherits from the 'header-line' face, but is the face actually used
+on the header lines (along with 'header-line-inactive').
+
\f
* Editing Changes in Emacs 31.1
:version "28.1"
:group 'basic-faces)
+(defface header-line-active
+ '((t :inherit header-line))
+ "Face for the selected header line.
+This inherits from the `header-line' face."
+ :version "29.5"
+ :group 'mode-line-faces
+ :group 'basic-faces)
+
+(defface header-line-inactive
+ '((t :inherit header-line))
+ "Basic header line face for non-selected windows."
+ :version "29.5"
+ :group 'mode-line-faces
+ :group 'basic-faces)
+
(defface vertical-border
'((((type tty)) :inherit mode-line-inactive))
"Face used for vertical window dividers on ttys."
: estimate_mode_line_height \
(XFRAME ((W)->frame), CURRENT_MODE_LINE_ACTIVE_FACE_ID (W)))))
+/* Return the desired face id for the header line of a window, depending
+ on whether the window is selected or not, or if the window is the
+ scrolling window for the currently active minibuffer window.
+
+ Due to the way display_mode_lines manipulates with the contents of
+ selected_window, this macro needs three arguments: SELW which is
+ compared against the current value of selected_window, MBW which is
+ compared against minibuf_window (if SELW doesn't match), and SCRW
+ which is compared against minibuf_selected_window (if MBW matches). */
+
+#define CURRENT_HEADER_LINE_ACTIVE_FACE_ID_3(SELW, MBW, SCRW) \
+ ((!mode_line_in_non_selected_windows \
+ || (SELW) == XWINDOW (selected_window) \
+ || (minibuf_level > 0 \
+ && !NILP (minibuf_selected_window) \
+ && (MBW) == XWINDOW (minibuf_window) \
+ && (SCRW) == XWINDOW (minibuf_selected_window))) \
+ ? HEADER_LINE_ACTIVE_FACE_ID \
+ : HEADER_LINE_INACTIVE_FACE_ID)
+
+
+/* Return the desired face id for the header line of window W. */
+
+#define CURRENT_HEADER_LINE_ACTIVE_FACE_ID(W) \
+ CURRENT_HEADER_LINE_ACTIVE_FACE_ID_3(W, \
+ XWINDOW (selected_window), \
+ W)
+
/* Return the current height of the header line of window W. If not known
from W->header_line_height, look at W's current glyph matrix, or return
an estimation based on the height of the font of the face `header-line'. */
= (MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
? MATRIX_HEADER_LINE_HEIGHT ((W)->current_matrix) \
: estimate_mode_line_height \
- (XFRAME ((W)->frame), HEADER_LINE_FACE_ID))))
+ (XFRAME ((W)->frame), CURRENT_HEADER_LINE_ACTIVE_FACE_ID (W)))))
/* Return the current height of the tab line of window W. If not known
from W->tab_line_height, look at W's current glyph matrix, or return
MODE_LINE_INACTIVE_FACE_ID,
TOOL_BAR_FACE_ID,
FRINGE_FACE_ID,
- HEADER_LINE_FACE_ID,
+ HEADER_LINE_ACTIVE_FACE_ID,
+ HEADER_LINE_INACTIVE_FACE_ID,
SCROLL_BAR_FACE_ID,
BORDER_FACE_ID,
CURSOR_FACE_ID,
if (hl_row && hl_row->mode_line_p)
height -= hl_row->height;
else
- height -= estimate_mode_line_height (f, HEADER_LINE_FACE_ID);
+ height -= estimate_mode_line_height (f, CURRENT_HEADER_LINE_ACTIVE_FACE_ID (w));
}
}
= window_parameter (w, Qheader_line_format);
w->header_line_height
- = display_mode_line (w, HEADER_LINE_FACE_ID,
+ = display_mode_line (w, CURRENT_HEADER_LINE_ACTIVE_FACE_ID (w),
NILP (window_header_line_format)
? BVAR (current_buffer, header_line_format)
: window_header_line_format);
BASE_FACE_ID is the id of a base face to use. It must be one of
DEFAULT_FACE_ID for normal text, MODE_LINE_ACTIVE_FACE_ID,
- MODE_LINE_INACTIVE_FACE_ID, or HEADER_LINE_FACE_ID for displaying
- mode lines, or TOOL_BAR_FACE_ID for displaying the tool-bar.
+ MODE_LINE_INACTIVE_FACE_ID, HEADER_LINE_ACTIVE_FACE_ID, or
+ HEADER_LINE_INACTIVE_FACE_ID for displaying mode lines, or
+ TOOL_BAR_FACE_ID for displaying the tool-bar.
If ROW is null and BASE_FACE_ID is equal to MODE_LINE_ACTIVE_FACE_ID,
- MODE_LINE_INACTIVE_FACE_ID, or HEADER_LINE_FACE_ID, the iterator
- will be initialized to use the corresponding mode line glyph row of
- the desired matrix of W. */
+ MODE_LINE_INACTIVE_FACE_ID, HEADER_LINE_ACTIVE_FACE_ID, or
+ HEADER_LINE_INACTIVE_FACE_ID the iterator will be initialized to use
+ the corresponding mode line glyph row of the desired matrix of W. */
void
init_iterator (struct it *it, struct window *w,
row = MATRIX_MODE_LINE_ROW (w->desired_matrix);
else if (base_face_id == TAB_LINE_FACE_ID)
row = MATRIX_TAB_LINE_ROW (w->desired_matrix);
- else if (base_face_id == HEADER_LINE_FACE_ID)
+ else if (base_face_id == HEADER_LINE_ACTIVE_FACE_ID
+ || base_face_id == HEADER_LINE_INACTIVE_FACE_ID)
{
/* Header line row depends on whether tab line is enabled. */
w->desired_matrix->tab_line_p = window_wants_tab_line (w);
Lisp_Object window_header_line_format
= window_parameter (w, Qheader_line_format);
- y = y + display_mode_line (w, HEADER_LINE_FACE_ID,
+ y = y + display_mode_line (w, CURRENT_HEADER_LINE_ACTIVE_FACE_ID (w),
NILP (window_header_line_format)
? BVAR (current_buffer, header_line_format)
: window_header_line_format);
line_number_displayed = false;
w->column_number_displayed = -1;
+ struct window *sel_w = XWINDOW (old_selected_window);
if (window_wants_mode_line (w))
{
Lisp_Object window_mode_line_format
= window_parameter (w, Qmode_line_format);
- struct window *sel_w = XWINDOW (old_selected_window);
/* Select mode line face based on the real selected window. */
display_mode_line (w,
Lisp_Object window_header_line_format
= window_parameter (w, Qheader_line_format);
- display_mode_line (w, HEADER_LINE_FACE_ID,
+ display_mode_line (w, CURRENT_HEADER_LINE_ACTIVE_FACE_ID_3 (sel_w, sel_w, w),
NILP (window_header_line_format)
? BVAR (current_buffer, header_line_format)
: window_header_line_format);
}
-/* Display mode or header/tab line of window W. FACE_ID specifies
- which line to display; it is either MODE_LINE_ACTIVE_FACE_ID,
- HEADER_LINE_FACE_ID or TAB_LINE_FACE_ID. FORMAT is the
- mode/header/tab line format to display. Value is the pixel height
- of the mode/header/tab line displayed. */
+/* Display mode or header/tab line of window W. FACE_ID specifies which
+ line to display; it is either MODE_LINE_ACTIVE_FACE_ID,
+ HEADER_LINE_ACTIVE_FACE_ID, HEADER_LINE_INACTIVE_FACE_ID, or
+ TAB_LINE_FACE_ID. FORMAT is the mode/header/tab line format to
+ display. Value is the pixel height of the mode/header/tab line
+ displayed. */
static int
display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format)
it.glyph_row->tab_line_p = true;
w->desired_matrix->tab_line_p = true;
}
- else if (face_id == HEADER_LINE_FACE_ID)
+ else if (face_id == HEADER_LINE_ACTIVE_FACE_ID
+ || face_id == HEADER_LINE_INACTIVE_FACE_ID)
w->desired_matrix->header_line_p = true;
/* FIXME: This should be controlled by a user option. But
record_unwind_save_match_data ();
if (NILP (Vmode_line_compact)
- || face_id == HEADER_LINE_FACE_ID || face_id == TAB_LINE_FACE_ID)
+ || face_id == HEADER_LINE_ACTIVE_FACE_ID
+ || face_id == HEADER_LINE_INACTIVE_FACE_ID
+ || face_id == TAB_LINE_FACE_ID)
{
mode_line_target = MODE_LINE_DISPLAY;
display_mode_element (&it, 0, 0, 0, format, Qnil, false);
? MODE_LINE_ACTIVE_FACE_ID : MODE_LINE_INACTIVE_FACE_ID)
: EQ (face, Qmode_line_active) ? MODE_LINE_ACTIVE_FACE_ID
: EQ (face, Qmode_line_inactive) ? MODE_LINE_INACTIVE_FACE_ID
- : EQ (face, Qheader_line) ? HEADER_LINE_FACE_ID
+ : EQ (face, Qheader_line_active) ? HEADER_LINE_ACTIVE_FACE_ID
+ : EQ (face, Qheader_line_inactive) ? HEADER_LINE_INACTIVE_FACE_ID
: EQ (face, Qtab_line) ? TAB_LINE_FACE_ID
: EQ (face, Qtab_bar) ? TAB_BAR_FACE_ID
: EQ (face, Qtool_bar) ? TOOL_BAR_FACE_ID
case DEFAULT_FACE_ID: name = Qdefault; break;
case MODE_LINE_ACTIVE_FACE_ID: name = Qmode_line_active; break;
case MODE_LINE_INACTIVE_FACE_ID: name = Qmode_line_inactive; break;
- case HEADER_LINE_FACE_ID: name = Qheader_line; break;
+ case HEADER_LINE_ACTIVE_FACE_ID: name = Qheader_line_active; break;
+ case HEADER_LINE_INACTIVE_FACE_ID: name = Qheader_line_inactive; break;
case TAB_LINE_FACE_ID: name = Qtab_line; break;
case TAB_BAR_FACE_ID: name = Qtab_bar; break;
case TOOL_BAR_FACE_ID: name = Qtool_bar; break;
realize_named_face (f, Qmode_line_inactive, MODE_LINE_INACTIVE_FACE_ID);
realize_named_face (f, Qtool_bar, TOOL_BAR_FACE_ID);
realize_named_face (f, Qfringe, FRINGE_FACE_ID);
- realize_named_face (f, Qheader_line, HEADER_LINE_FACE_ID);
+ realize_named_face (f, Qheader_line_active, HEADER_LINE_ACTIVE_FACE_ID);
+ realize_named_face (f, Qheader_line_inactive, HEADER_LINE_INACTIVE_FACE_ID);
realize_named_face (f, Qscroll_bar, SCROLL_BAR_FACE_ID);
realize_named_face (f, Qborder, BORDER_FACE_ID);
realize_named_face (f, Qcursor, CURSOR_FACE_ID);
DEFSYM (Qfringe, "fringe");
DEFSYM (Qtab_line, "tab-line");
DEFSYM (Qheader_line, "header-line");
+ DEFSYM (Qheader_line_inactive, "header-line-inactive");
+ DEFSYM (Qheader_line_active, "header-line-active");
DEFSYM (Qscroll_bar, "scroll-bar");
DEFSYM (Qmenu, "menu");
DEFSYM (Qcursor, "cursor");