all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex <agrambot@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 28033@debbugs.gnu.org
Subject: bug#28033: [PATCH] Add new face 'header-line-highlight'
Date: Fri, 11 Aug 2017 16:10:02 -0600	[thread overview]
Message-ID: <87mv75iwn9.fsf@lylat> (raw)
In-Reply-To: <83k22aqdwd.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 11 Aug 2017 19:15:30 +0300")

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

Eli Zaretskii <eliz@gnu.org> 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...


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: header-line 2 --]
[-- Type: text/x-diff, Size: 3759 bytes --]

From d0ed559373afa9c1922cb40eed156d68e5c1f344 Mon Sep 17 00:00:00 2001
From: Alexander Gramiak <agrambot@gmail.com>
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


  reply	other threads:[~2017-08-11 22:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09 23:29 bug#28033: [PATCH] Add new face 'header-line-highlight' Alex
2017-08-10  4:13 ` Eli Zaretskii
2017-08-10  5:36   ` Alex
2017-08-11 16:15     ` Eli Zaretskii
2017-08-11 22:10       ` Alex [this message]
2017-08-12  7:20         ` Eli Zaretskii
2017-08-13  3:05           ` Alex
2017-08-13 14:27             ` Eli Zaretskii
2017-08-13 14:59               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mv75iwn9.fsf@lylat \
    --to=agrambot@gmail.com \
    --cc=28033@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.