Subject: bug#28033: closed (Re: bug#28033: [PATCH] Add new face 'header-line-highlight')

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 12 Aug 2017 07:21:02 +0000

Your bug report

#28033: [PATCH] Add new face 'header-line-highlight'

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
28033: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=28033
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#28033: [PATCH] Add new face 'header-line-highlight'
From: Eli Zaretskii <[email-masked]>
To: Alex <[email-masked]>
Cc: [email-masked]
Date: Sat, 12 Aug 2017 10:20:03 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Alex <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 11 Aug 2017 16:10:02 -0600
> 
> > 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.

That's what I was looking for (although I made minor wording changes
in the actual commit).

> > 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...

Yes, something to work on.  Patches welcome.

I've pushed the changes.  A couple of minor comments for the future:

 . Please mention the bug number in the log message.
 . The order of the references to various parts of the changes in the
   log message should assume the reading order of top to bottom, so
   the log message might need some minor reordering.  In this case,
   your original order:

> * 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.

   refers to "the face" before it was defined.  I've reordered it to
   put the reference to the lisp/faces.el change before all the rest.

Thanks again for working on this.

Subject: [PATCH] Add new face 'header-line-highlight'
From: Alex <[email-masked]>
To: [email-masked]
Date: Wed, 09 Aug 2017 17:29:19 -0600
List-Id: <debbugs-submit.debbugs.gnu.org>

Some header-line configurations don't interact nicely with the
'highlight' face, particularly when they use the :box attribute.

>From 6ac60c53180c87d1b5c5dd2ebdfda259938a8e32 Mon Sep 17 00:00:00 2001
From: Alexander Gramiak <[email-masked]>
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            | 4 ++++
 etc/NEWS                          | 5 +++++
 lisp/emacs-lisp/tabulated-list.el | 2 +-
 lisp/faces.el                     | 5 +++++
 lisp/info.el                      | 2 +-
 5 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 083fcdf97a..440aab1055 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -711,6 +711,10 @@ 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.
 @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..dfb7ca3fca 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -254,6 +254,11 @@ face instead of the 'escape-glyph' face.
 ** Approximations to quotes are now displayed with the new 'homoglyph'
 face instead of the 'escape-glyph' face.
 
++++
+** The new face 'header-line-highlight' has been introduced as the
+header line analogue of 'mode-line-highlight'.  This 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