From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: trevor.m.murphy@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#73862: [PATCH] Add `header-line-active` and `header-line-inactive` faces. Date: Fri, 18 Oct 2024 05:56:32 -0700 Message-ID: <87y12lo9hb.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3881"; mail-complaints-to="usenet@ciao.gmane.io" To: 73862@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 18 14:57:55 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t1mYD-0000lW-Uc for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Oct 2024 14:57:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1mY2-0002DS-MK; Fri, 18 Oct 2024 08:57:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1mY1-0002DA-08 for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 08:57:41 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1mY0-0002Sl-9H for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 08:57:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=ZkfWiR8Cq4GMjCCPxwzXK8KZbXu7zNQQPpFHrN+Jk+M=; b=Cvm6f5MlcPeNjU2XALOsSMpwxgO5qZ4tmCj679dXniIs7WDZpMm0e7wcnNJnBGt6BbkRyfFNhTUfN+gTOByRkR+w1+WmFxaua/CYo6fWa1fPIpgNAFI6u51L64z48hF8enuIv2CrfMp1dC3jp89IxiShFb/JDvG6LPVVS/hyQLpZHbO8Xw5eNbUop4R8BlN8G5FMDcnOaOBCdQxj6zGjG04kljaU8Tb9snNtEG8NGn343fj650ERzLu06kX0M+UuOGs2oF108YsyTqNcr26xaiI6fi7dfB3ASYZVkc8dDwXZIkWGTrwdPUP5nhX/IugGM+XyK5UPUYC4ao1A8G01iQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t1mYM-0006Ov-Ii for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 08:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: trevor.m.murphy@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Oct 2024 12:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73862 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.172925625524552 (code B ref -1); Fri, 18 Oct 2024 12:58:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Oct 2024 12:57:35 +0000 Original-Received: from localhost ([127.0.0.1]:37510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1mXt-0006Nk-U9 for submit@debbugs.gnu.org; Fri, 18 Oct 2024 08:57:34 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:51104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1mXr-0006Nb-EU for submit@debbugs.gnu.org; Fri, 18 Oct 2024 08:57:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1mXU-0002BO-Q0 for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 08:57:08 -0400 Original-Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1mXS-0002QX-8X for bug-gnu-emacs@gnu.org; Fri, 18 Oct 2024 08:57:08 -0400 Original-Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-20bb39d97d1so19553345ad.2 for ; Fri, 18 Oct 2024 05:57:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729256224; x=1729861024; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=ZkfWiR8Cq4GMjCCPxwzXK8KZbXu7zNQQPpFHrN+Jk+M=; b=GGtFdz5/F6ZCCWQfyoodYa5MLwHyM+vIAXQr92U518deuRBduAllmKT20C8J2XWVbR 3bXfQw+Wt7U3t4X0H6a/hsxAhaybwp6tkKbw4FFizpSpBwwI1GDcwi9SFcS1knrkpXlm oLiO1per/uipECaEluahOLtQWZhG0SU8Zmskk8jvUddmgYuv9iBNrPmobkCxzaILGz7W p6N7eGXT21D0A8wyjjTV09wkY+mfn7YaHk+VF2AiltNzFLQ7yYuD+JslwkBdNrLP07yP Ye6Bpy8LpxcjoJkgyIp2q9Wt2rdP5EOsH+AFRC2a4xKUkbV+YgmQ+JJsb5spvjXml0qX xhfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729256224; x=1729861024; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZkfWiR8Cq4GMjCCPxwzXK8KZbXu7zNQQPpFHrN+Jk+M=; b=HmIane0apTM9uiPM7tyqylKpVz0Eu5+DdoFEakfs9Z4yePY1O4iRgYAn1blSYWA1r1 2IYoBtStQ6GgYgKeHhvRY6fGppxzJx8g9/OLCIYZkJuehT2Xr9jC439L6PvtYgX9P8vf F8tmNlCPp3BfLMRaenNKyuZUE+V2QIxmz4DRDdUDDSxkE3iT8g8o5FC7tHi38RN6InRg 8KG8AccomDinBJYWrhORTa643ePQYZn2FWZY+R4c1YhTUZRFkJ6uWf9vlAMMzQOb9T5w IFKnWDwO7DJHcgZTGZHbzkS7ewx2siF6oua1xRlllSSiQ+5Layr5NwGqu4U59MdrmAx3 xN1A== X-Gm-Message-State: AOJu0YyD4Vk+0zWpYehiiD9FabBRIBQ3L9sPWn0I2hseBpZl4CS+CXfX EvZ9PkFQShMQwxRqTNBn5OLuZheN6lppPNn9K4PhCE2ntmDIsQdLAETDUA== X-Google-Smtp-Source: AGHT+IFiztVnFXnaUfjLKPdY0eZ6oyDAB5Q9VFM3905/8FrVJuaaTUOQTNAvYAJNU0BFhftmXsP+kQ== X-Received: by 2002:a17:903:1104:b0:20b:6458:ec83 with SMTP id d9443c01a7336-20e5a728324mr28780545ad.4.1729256223858; Fri, 18 Oct 2024 05:57:03 -0700 (PDT) Original-Received: from yoga ([2601:1c2:b00:dac0::2868]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20e5a752abasm12074605ad.75.2024.10.18.05.57.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 05:57:03 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::632; envelope-from=trevor.m.murphy@gmail.com; helo=mail-pl1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293791 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Got a quick feature request. Over the years I've put more and more information into the header line, and at some point I wanted to get that quick visual indicator of selected vs non-selected windows when I glanced at the header as I already got from the mode line. This was surprisingly hard to achieve! For a few years I used an ugly `buffer-list-update-hook` hack. Then a few months ago I got adventurous and found that it actually wasn't as hard as I'd feared to hack these into the C source. The new faces both inherit from the current `header-line` face, so there shouldn't be any visible impact if users don't customize the new faces. For cases like mine it's easy to customize header-line-inactive to inherit from mode-line-inactive. Thanks in advance for your attention and feedback, Trevor In GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0) Repository revision: a92669f7ae7de3172cf883d15af9d7bb9bda7dd9 Repository branch: main System Description: Arch Linux Configured using: 'configure --with-pgtk --with-native-compilation=aot --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib --with-tree-sitter --localstatedir=/var --with-cairo --disable-build-details --with-harfbuzz --with-libsystemd --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/home/trevor/pkgbuilds/abs/emacs/src=/usr/src/debug/emacs -flto=auto' 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto' 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/home/trevor/pkgbuilds/abs/emacs/src=/usr/src/debug/emacs -flto=auto'' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Add-new-header-line-active-and-header-line-inactive-.patch >From 1000a0bac791dbe31da627389db9755fddf51243 Mon Sep 17 00:00:00 2001 From: Trevor Murphy Date: Thu, 17 Oct 2024 15:51:14 -0700 Subject: [PATCH] Add new `header-line-active` and `header-line-inactive` faces. This is all intended to parallel the mode-line-active and mode-line-inactive distinction. * src/dispextern.h (CURRENT_HEADER_LINE_ACTIVE_FACE_ID_3, CURRENT_HEADER_LINE_ACTIVE_FACE_ID): new macros based on mode line equivalents (face_id): new face IDs * src/xdisp.c (window_box_height, pos_visible_p, init_iterator, window_text_pixel_size, display_mode_lines, display_mode_line, format-mode-line): replace all uses of HEADER_LINE_FACE_ID with either a new macro or the new face IDs * src/xfaces.c (syms_of_xfaces): new lisp symbols (lookup_basic_face, realize_basic_faces): map new face IDs to their lisp symbols * lisp/faces.el (header-line-active, header-line-inactive): new deffaces --- lisp/faces.el | 24 ++++++++++++++++++++++++ src/dispextern.h | 33 +++++++++++++++++++++++++++++++-- src/xdisp.c | 45 ++++++++++++++++++++++++++------------------- src/xfaces.c | 8 ++++++-- 4 files changed, 87 insertions(+), 23 deletions(-) diff --git a/lisp/faces.el b/lisp/faces.el index 21c3e663c6e..25a93d0ed7a 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2821,6 +2821,30 @@ Use the face `mode-line-highlight' for features that can be selected." :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 + '((default + :inherit header-line) + (((class color) (min-colors 88) (background light)) + :weight light + :box (:line-width -1 :color "grey75" :style nil) + :foreground "grey20" :background "grey90") + (((class color) (min-colors 88) (background dark) ) + :weight light + :box (:line-width -1 :color "grey40" :style nil) + :foreground "grey80" :background "grey30")) + "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." diff --git a/src/dispextern.h b/src/dispextern.h index cc248a4472e..0d4c0a6c67e 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1561,6 +1561,34 @@ struct glyph_string : 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'. */ @@ -1572,7 +1600,7 @@ struct glyph_string = (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 @@ -1893,7 +1921,8 @@ enum face_id 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, diff --git a/src/xdisp.c b/src/xdisp.c index c74e81a3933..98bc157c789 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1358,7 +1358,7 @@ window_box_height (struct window *w) 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)); } } @@ -1753,7 +1753,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y, = 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); @@ -3197,13 +3197,14 @@ CHECK_WINDOW_END (struct window *w) 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, @@ -3251,7 +3252,8 @@ 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); @@ -11854,7 +11856,7 @@ window_text_pixel_size (Lisp_Object window, Lisp_Object from, Lisp_Object to, 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); @@ -27453,11 +27455,11 @@ display_mode_lines (struct window *w) 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, @@ -27485,7 +27487,7 @@ display_mode_lines (struct window *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); @@ -27500,11 +27502,12 @@ display_mode_lines (struct window *w) } -/* 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) @@ -27525,7 +27528,8 @@ 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 @@ -27544,7 +27548,9 @@ display_mode_line (struct window *w, enum face_id face_id, Lisp_Object format) 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); @@ -28313,7 +28319,8 @@ are the selected window and the WINDOW's buffer). */) ? 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 diff --git a/src/xfaces.c b/src/xfaces.c index e248279e9b7..f6264802fa4 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -5117,7 +5117,8 @@ lookup_basic_face (struct window *w, struct frame *f, int 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; @@ -5867,7 +5868,8 @@ realize_basic_faces (struct frame *f) 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); @@ -7438,6 +7440,8 @@ syms_of_xfaces (void) 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"); -- 2.46.2 --=-=-=--