emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 84288cf: Add new face 'header-line-highlight'


From: Eli Zaretskii
Subject: [Emacs-diffs] master 84288cf: Add new face 'header-line-highlight'
Date: Sat, 12 Aug 2017 03:14:38 -0400 (EDT)

branch: master
commit 84288cf4211a4490c0155d3c0022617b92294f49
Author: Alexander Gramiak <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Add new face 'header-line-highlight'
    
    * lisp/faces.el: Define the face.
    * lisp/emacs-lisp/tabulated-list.el (tabulated-list-init-header):
    * lisp/info.el (Info-fontify-node): Use the new face.
    * doc/emacs/display.texi (Standard Faces):
    * etc/NEWS: Document the new face.  (Bug#28033)
---
 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 083fcdf..45cfb95 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -711,6 +711,12 @@ Similar to @code{mode-line} for a window's header line, 
which appears
 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.
address@hidden header-line-highlight
address@hidden 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 is a
+separate face because the @code{header-line} face might be customized
+in a way that does not 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 2b789be..0670a7b 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 8ff5cdf..b91532f 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -191,7 +191,7 @@ Populated by `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 5ed11d1..01d94d7 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2628,6 +2628,11 @@ Use the face `mode-line-highlight' for features that can 
be selected."
   :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 c7f0bbf..45a9116 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -4654,7 +4654,7 @@ first line or header line, and for breadcrumb links.")
             (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 "



reply via email to

[Prev in Thread] Current Thread [Next in Thread]