From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Newsgroups: gmane.emacs.bugs Subject: bug#28033: [PATCH] Add new face 'header-line-highlight' Date: Fri, 11 Aug 2017 16:10:02 -0600 Message-ID: <87mv75iwn9.fsf@lylat> References: <87bmno7228.fsf@lylat> <83k22crrfg.fsf@gnu.org> <874ltg6l2k.fsf@lylat> <83k22aqdwd.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1502489472 15676 195.159.176.226 (11 Aug 2017 22:11:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 11 Aug 2017 22:11:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: 28033@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Aug 12 00:11:08 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgI94-0003js-M0 for geb-bug-gnu-emacs@m.gmane.org; Sat, 12 Aug 2017 00:11:06 +0200 Original-Received: from localhost ([::1]:53106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgI9A-0004XU-MF for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Aug 2017 18:11:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dgI94-0004X0-HH for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2017 18:11:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dgI90-0002Gc-Cy for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2017 18:11:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47398) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dgI90-0002GC-9t for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2017 18:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dgI90-0003Sw-27 for bug-gnu-emacs@gnu.org; Fri, 11 Aug 2017 18:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Aug 2017 22:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28033-submit@debbugs.gnu.org id=B28033.150248941713272 (code B ref 28033); Fri, 11 Aug 2017 22:11:02 +0000 Original-Received: (at 28033) by debbugs.gnu.org; 11 Aug 2017 22:10:17 +0000 Original-Received: from localhost ([127.0.0.1]:56079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgI8G-0003Rz-UN for submit@debbugs.gnu.org; Fri, 11 Aug 2017 18:10:17 -0400 Original-Received: from mail-it0-f68.google.com ([209.85.214.68]:32864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dgI8E-0003Rm-Qv for 28033@debbugs.gnu.org; Fri, 11 Aug 2017 18:10:15 -0400 Original-Received: by mail-it0-f68.google.com with SMTP id m34so4529040iti.0 for <28033@debbugs.gnu.org>; Fri, 11 Aug 2017 15:10:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=doZzRbiQbAQgdYVEluz8EzSBeypLi6gzzMLVEpBa2MY=; b=Y1C9SchKjzv2+FWe0IDSnVrsBGmg2tcuiVRcQMJhGJMAAZNU74Fnm7H3Tj+0gs4rQu FQkt3NZJqEz+5vlDsrZc2G2K+1d2hdgzHNuqCL1c9Dbj8mbQgauakHFySLcTa+TYeg51 1Cw5FFs1amKFSUfBvKu4HL2EenunyNby2yWlWHHTbWVEiRqYPE9O5zEc738QlBEvlU3J LRv/Ri7FV546W4115zvMXJRTpq1VT5D6q1Z5HpRhsFsxN3pGBUqD6JVyhPoI0EpTSRnQ kOT4eP6+QnQp+5pe8mxJJJpf1K9MdhKHW9yJciBKrHZPDztipzm9DZMEX3ytz9mFNJqh RvXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=doZzRbiQbAQgdYVEluz8EzSBeypLi6gzzMLVEpBa2MY=; b=dWiY6EM2kIHkDAYIe04mYDVjTC2XnU+/B5UHFfKslyHkVDPfBKIH9R+tgg4OQXlnDB uemljw0lMLsxE47F9BxTfYm4pf2GnFy/VifvV2nvm3NwYCT5f9hUE/zR9qz5jxj+yajE 3QOgSOVdPl8NrSUGAbI0dcg+qE8o6BPJwy/ZgLPl7GCK9E+o/BfdDt0P7/wfcfSDk6mH iiDwjMeU9e3U/YhiT8/bE6kk03H3k5yBOeYX4JRlL0q9W/o3aYMMr5Vl+4u+LqWpj0yF zsu4sA18SDI+BZl6M1kGV55qrmf7e9bZ4nhhsWY+4C4YVh1wXaYBMm3sfrqlf847V3vZ DHkA== X-Gm-Message-State: AHYfb5hQIgKhSwbpAsqf/tungI8nGv4Zak2f7VEzQPD2T7GAC/qJgutP SnWl/zkk0h7rC0+N X-Received: by 10.36.112.199 with SMTP id f190mr147814itc.161.1502489408833; Fri, 11 Aug 2017 15:10:08 -0700 (PDT) Original-Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id b8sm69354itc.11.2017.08.11.15.10.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Aug 2017 15:10:07 -0700 (PDT) In-Reply-To: <83k22aqdwd.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 11 Aug 2017 19:15:30 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:135664 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: > Thanks, this makes sense. But please add some of this rationale to > the documentation. I'm not sure exactly what you're looking for, but I added a brief explanation to the doc. > Also, it is preferable to have the first line of a NEWS item be a full > sentence, if possible. In this case, I would just say > > ** New face 'header-line-highlight'. > > and then follow that by the details. Sure. It seems that a lot of nearby entries don't follow that style, though... --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-new-face-header-line-highlight.patch Content-Description: header-line 2 >From d0ed559373afa9c1922cb40eed156d68e5c1f344 Mon Sep 17 00:00:00 2001 From: Alexander Gramiak Date: Wed, 9 Aug 2017 17:14:06 -0600 Subject: [PATCH] Add new face 'header-line-highlight' * doc/emacs/display.texi (Standard Faces): * etc/NEWS: Document the face. * lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header): * lisp/info.el (Info-fontify-node): Use the face. * lisp/faces.el: Define the face. --- doc/emacs/display.texi | 6 ++++++ etc/NEWS | 6 ++++++ lisp/emacs-lisp/tabulated-list.el | 2 +- lisp/faces.el | 5 +++++ lisp/info.el | 2 +- 5 files changed, 19 insertions(+), 2 deletions(-) diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index 083fcdf97a..832629c733 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -711,6 +711,12 @@ Standard Faces at the top of a window just as the mode line appears at the bottom. Most windows do not have a header line---only some special modes, such Info mode, create one. +@item header-line-highlight +@cindex header-line-highlight face +Similar to @code{highlight} and @code{mode-line-highlight}, but used +for mouse-sensitive portions of text on header lines. This face is +useful for when @code{header-line} doesn't interact well with +@code{highlight}. @item vertical-border @cindex vertical-border face This face is used for the vertical divider between windows on text diff --git a/etc/NEWS b/etc/NEWS index 2b789be3c8..50499f2f09 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -254,6 +254,12 @@ face instead of the 'escape-glyph' face. ** Approximations to quotes are now displayed with the new 'homoglyph' face instead of the 'escape-glyph' face. ++++ +** New face 'header-line-highlight'. +This face is the header line analogue of 'mode-line-highlight'; it +should be the preferred mouse-face for mouse-sensitive elements in the +header line. + --- ** 'C-x h' ('mark-whole-buffer') will now avoid marking the prompt part of minibuffers. diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 8ff5cdf18e..b91532f7e8 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -191,7 +191,7 @@ tabulated-list-init-header ;; FIXME: Should share code with tabulated-list-print-col! (let ((x (max tabulated-list-padding 0)) (button-props `(help-echo "Click to sort by column" - mouse-face highlight + mouse-face header-line-highlight keymap ,tabulated-list-sort-button-map)) (cols nil)) (if display-line-numbers diff --git a/lisp/faces.el b/lisp/faces.el index 5ed11d11ce..01d94d7aae 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -2628,6 +2628,11 @@ header-line :version "21.1" :group 'basic-faces) +(defface header-line-highlight '((t :inherit highlight)) + "Basic header line face for highlighting." + :version "26.1" + :group 'basic-faces) + (defface vertical-border '((((type tty)) :inherit mode-line-inactive)) "Face used for vertical window dividers on ttys." diff --git a/lisp/info.el b/lisp/info.el index c7f0bbf08d..45a9116e06 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -4654,7 +4654,7 @@ Info-fontify-node (if (string-equal (downcase tag) "node") (put-text-property nbeg nend 'font-lock-face 'info-header-node) (put-text-property nbeg nend 'font-lock-face 'info-header-xref) - (put-text-property tbeg nend 'mouse-face 'highlight) + (put-text-property tbeg nend 'mouse-face 'header-line-highlight) (put-text-property tbeg nend 'help-echo (concat "mouse-2: Go to node " -- 2.13.2 --=-=-=--