From: Alex <agrambot@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: maplant95@gmail.com, emacs-devel@gnu.org
Subject: Re: Emacs26: Quick thoughts on display-line-numbers-mode
Date: Sat, 07 Oct 2017 15:12:11 -0600 [thread overview]
Message-ID: <87h8vad5n8.fsf@gmail.com> (raw)
In-Reply-To: <83a814wz3w.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 06 Oct 2017 09:48:35 +0300")
[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Alex <agrambot@gmail.com>
>> Cc: Matthew Plant <maplant95@gmail.com>, emacs-devel@gnu.org
>> Date: Thu, 05 Oct 2017 17:24:15 -0600
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> >> That being said, shouldn't this face be part of the group display-line-
>> >> number? Faces for compilation errors are part of the the compilation
>> >> group.
>> >
>> > My reasoning was that this is one of the basic faces we provide, so
>> > it's in the basic faces group.
>>
>> It appears that a face can be added to multiple groups.
>
> Which other faces are in more than one group?
Here are some in face.el:
mode-line*
window-divider*
fringe
cursor
mouse
menu
>> Perhaps this should be done for the line-number* faces?
>
> If this is established practice, no objections here.
Okay, I've attached a patch which does this. Additionally, I added the
`display-line-numbers' group to the `convenience' group since (n)linum
belong to that group. nlinum belongs to 2 groups already, as do groups
such as `message' and `mode-line-faces', so it should also be fine.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: d-l-n --]
[-- Type: text/x-diff, Size: 1602 bytes --]
From 1b78dd8aa2757e9901b2e0ed69a9e7ea55350284 Mon Sep 17 00:00:00 2001
From: Alexander Gramiak <agrambot@gmail.com>
Date: Sat, 7 Oct 2017 15:02:01 -0600
Subject: [PATCH] Add line-number faces to the display-line-numbers group
* lisp/faces.el (line-number):
(line-number-current-line): Add to the display-line-numbers group.
* lisp/display-line-numbers.el (display-line-numbers): Add to the
convenience group.
---
lisp/display-line-numbers.el | 1 +
lisp/faces.el | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/display-line-numbers.el b/lisp/display-line-numbers.el
index 3b6b101de4..15e0427915 100644
--- a/lisp/display-line-numbers.el
+++ b/lisp/display-line-numbers.el
@@ -36,6 +36,7 @@
(defgroup display-line-numbers nil
"Display line numbers in the buffer."
+ :group 'convenience
:group 'display)
(defcustom display-line-numbers-type t
diff --git a/lisp/faces.el b/lisp/faces.el
index 24ab1fa4f0..a5f1d1dd32 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2483,7 +2483,8 @@ line-number
and text lines might move horizontally as you move through
the buffer."
:version "26.1"
- :group 'basic-faces)
+ :group 'basic-faces
+ :group 'display-line-numbers)
(defface line-number-current-line
'((t :inherit line-number))
@@ -2497,7 +2498,8 @@ line-number-current-line
from that of the `line-number' face could produce such
unwanted effects."
:version "26.1"
- :group 'basic-faces)
+ :group 'basic-faces
+ :group 'display-line-numbers)
(defface escape-glyph
'((((background dark)) :foreground "cyan")
--
2.14.2
next prev parent reply other threads:[~2017-10-07 21:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-05 18:38 Emacs26: Quick thoughts on display-line-numbers-mode Robert Weiner
2017-10-05 18:52 ` Matthew Plant
2017-10-05 19:13 ` Eli Zaretskii
[not found] ` <1507232129.15251.12.camel@gmail.com>
2017-10-05 19:50 ` Eli Zaretskii
2017-10-05 20:07 ` Matthew Plant
2017-10-05 23:24 ` Alex
2017-10-06 6:48 ` Eli Zaretskii
2017-10-07 21:12 ` Alex [this message]
2017-10-08 7:44 ` Eli Zaretskii
2017-10-09 0:06 ` Alex
2017-10-05 19:02 ` Eli Zaretskii
2017-10-05 19:44 ` Robert Weiner
2017-10-05 19:58 ` Eli Zaretskii
2017-10-05 21:34 ` Robert Weiner
2017-10-06 3:09 ` Matthew Plant
2017-10-06 7:26 ` Eli Zaretskii
2017-10-06 7:50 ` Matthew Plant
2017-10-06 8:16 ` Eli Zaretskii
2017-10-06 12:37 ` Stefan Monnier
2017-10-06 13:06 ` Eli Zaretskii
2017-10-06 13:25 ` John Wiegley
2017-10-06 14:17 ` Eli Zaretskii
2017-10-06 18:47 ` John Wiegley
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h8vad5n8.fsf@gmail.com \
--to=agrambot@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=maplant95@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).