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: Wed, 09 Aug 2017 17:29:19 -0600 Message-ID: <87bmno7228.fsf@lylat> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1502321420 7742 195.159.176.226 (9 Aug 2017 23:30:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 9 Aug 2017 23:30:20 +0000 (UTC) To: 28033@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 10 01:30:16 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 1dfaQR-0001Fm-D4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Aug 2017 01:30:07 +0200 Original-Received: from localhost ([::1]:50279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfaQX-0003Ul-Le for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Aug 2017 19:30:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53870) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfaQR-0003T5-HQ for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 19:30:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dfaQM-0004Lu-J7 for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 19:30:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45133) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dfaQM-0004Lo-FB for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 19:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dfaQM-0001lj-3K for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 19:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Aug 2017 23:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28033 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.15023213776731 (code B ref -1); Wed, 09 Aug 2017 23:30:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Aug 2017 23:29:37 +0000 Original-Received: from localhost ([127.0.0.1]:53813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfaPw-0001kV-Iz for submit@debbugs.gnu.org; Wed, 09 Aug 2017 19:29:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfaPv-0001kJ-BT for submit@debbugs.gnu.org; Wed, 09 Aug 2017 19:29:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dfaPo-00046H-Lj for submit@debbugs.gnu.org; Wed, 09 Aug 2017 19:29:30 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35633) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dfaPo-000467-HA for submit@debbugs.gnu.org; Wed, 09 Aug 2017 19:29:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dfaPm-0003DN-RP for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 19:29:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dfaPj-000452-NP for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 19:29:26 -0400 Original-Received: from mail-it0-x232.google.com ([2607:f8b0:4001:c0b::232]:37743) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dfaPj-00044t-Gs for bug-gnu-emacs@gnu.org; Wed, 09 Aug 2017 19:29:23 -0400 Original-Received: by mail-it0-x232.google.com with SMTP id 76so5275589ith.0 for ; Wed, 09 Aug 2017 16:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=RbL/BZzP5vpInpKpBnz/d9upIMmIHst+kMEj7R28qTA=; b=PQH9nDjfp0Co4f3EQ8oB6fHYCcDe+eLgg1FYzfzLnzy45vt4YyK1LuCJZlMO+e4b3K WmRVYg96/X6CRFZni4hvVpdbN56IgI5LAecDQhljwTpYSfbUH5y7OXUxDCcaTJu3w7u7 P+Op6cwoCBDvF6dNqMHel5bgtst2UzwtRzckM1sHg+mwU4Dmv7Nqa1IP/tRcx2yR2+hV 8uQql93cwoMtBm8LKLvTbX67UGxsNSJcbFA1TNgwFS/Ql5V3GY04fMDmevFHAGsx+P81 Xn+v0V8O9yGAou64wv6OKy+QMlINK8SvO55kH9bp4XTBrkUGhwXdNB6n7iVmFNAfm2xG JH4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=RbL/BZzP5vpInpKpBnz/d9upIMmIHst+kMEj7R28qTA=; b=DKlvtIIf2i6ohsYXyS9RXJRAffnxRil9kYpQhxXQIPd1SCWrbTESQb9ucXo98HOj8d C7+PCnEJ+b+FJbl2gYDvrrU5LubZwpG8Az9Th9enhBFp4PQVKtbb5kgAHJJXDFfjpLRT V9T7O2530CWIZTE5WWaeF67PtRfj2dXSx8lHoNH+xwMsG9sBscVkzhZjbwTOsQPM8OWv sy28DSATbszKqo2rsGo1hiOJX8d/XZ/JKKOto6Wi0jEgwRkz4Mus6/XtDLTf7dh38PCE hvO+FsmGhS1l7ODqzLSxjUjgAOWst+toiEeYvtPXch/qZUs6FjmPaRzaKcqOoMwHXUPH R2EA== X-Gm-Message-State: AIVw1100ngqpOs+togYMgAxwuBZ+1gj5OveVwy2hlywkNiTiL18JydwH M8zB76uD1gAapsbW X-Received: by 10.36.197.3 with SMTP id f3mr7908248itg.137.1502321362530; Wed, 09 Aug 2017 16:29:22 -0700 (PDT) Original-Received: from lylat (S010664777d9cebe3.ss.shawcable.net. [70.64.85.59]) by smtp.gmail.com with ESMTPSA id v18sm1194689ioi.81.2017.08.09.16.29.20 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Aug 2017 16:29:21 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:135613 Archived-At: --=-=-= Content-Type: text/plain Some header-line configurations don't interact nicely with the 'highlight' face, particularly when they use the :box attribute. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Add-new-face-header-line-highlight.patch Content-Description: header-line-highlight >From 6ac60c53180c87d1b5c5dd2ebdfda259938a8e32 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 | 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 --=-=-=--