[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tab-line-alternate-colors
From: |
Adam Porter |
Subject: |
Re: [PATCH] tab-line-alternate-colors |
Date: |
Mon, 14 Dec 2020 04:05:24 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Juri Linkov <juri@linkov.net> writes:
>> Okay, here's my next proposal: The tab-line-tab-face-default function
>> returns a face, and then a new option, tab-line-tab-face-modifiers, is a
>> list of functions, each of which is called with that face and returns
>> it, possibly modified.
>
> Thanks, tab-line-tab-face-modifiers is a good idea. It's like hooks
> used to post-process the result. But the '-hooks' suffix is deprecated,
> and the new standard is to end such variable names in '-functions'.
> Then using the name tab-line-tab-face-functions will also avoid ambiguity
> of the word 'modifiers' that is mostly applied to key modifiers -
> there is already the option tab-bar-select-tab-modifiers.
Sure, I'll change that in the next patch.
> Then tab-line-tab-face-functions will obsolete the need to have an
> almost duplicate option tab-line-tab-face-function. But then we have
> two variants:
>
> 1. add tab-line-tab-face-default to tab-line-tab-face-functions by default.
>
> 2. remove tab-line-tab-face-default and leave its code in
> tab-line-format-template
> as before, with a supposition that it should be sufficient to customize
> tab-line-tab-face-functions to post-process its output face.
>
> What variant would you prefer?
Hmm, I'm not sure which is best. #1 might be the cleanest in theory,
but it would seem to conflate the two types of functions: the initial
face-determining function and the face-modifying functions. So that
variant would seem to require one of two approaches: a) require the
function tab-line-tab-face-default to be first in the list of functions
(which would be error-prone), or b) modify the function
tab-line-tab-face-default to work as a face-modifier so it could work
regardless of its position in the list (and it would need to be able to
start from a nil face, which might be awkward).
OTOH, #2 would minimize the diff from master and avoid the problems that
#1 would seem to present.
So I suppose I would choose variant #2, although I don't have a strong
preference, and I might be overlooking something that would make #1 a
better choice.
WDYT? Thanks.
- Re: [PATCH] tab-line-alternate-colors, (continued)
- Re: [PATCH] tab-line-alternate-colors, Eli Zaretskii, 2020/12/13
- Re: [PATCH] tab-line-alternate-colors, Adam Porter, 2020/12/13
- Re: [PATCH] tab-line-alternate-colors, Eli Zaretskii, 2020/12/14
- Re: [PATCH] tab-line-alternate-colors, Adam Porter, 2020/12/15
- Re: [PATCH] tab-line-alternate-colors, Eli Zaretskii, 2020/12/16
- Re: [PATCH] tab-line-alternate-colors, Juri Linkov, 2020/12/13
- Re: [PATCH] tab-line-alternate-colors, Adam Porter, 2020/12/13
- Re: [PATCH] tab-line-alternate-colors, Adam Porter, 2020/12/14
- Re: [PATCH] tab-line-alternate-colors, Juri Linkov, 2020/12/14
- Re: [PATCH] tab-line-alternate-colors, Juri Linkov, 2020/12/14
- Re: [PATCH] tab-line-alternate-colors,
Adam Porter <=
- Re: [PATCH] tab-line-alternate-colors, Juri Linkov, 2020/12/14
- Re: [PATCH] tab-line-alternate-colors, Adam Porter, 2020/12/15
- Re: [PATCH] tab-line-alternate-colors, Adam Porter, 2020/12/15
- Re: [PATCH] tab-line-alternate-colors, Juri Linkov, 2020/12/16
- Re: [PATCH] tab-line-alternate-colors, Adam Porter, 2020/12/16
- Re: [PATCH] tab-line-alternate-colors, Juri Linkov, 2020/12/16
- Re: [PATCH] tab-line-alternate-colors, Adam Porter, 2020/12/17
- Re: [PATCH] tab-line-alternate-colors, Juri Linkov, 2020/12/23
- Re: [PATCH] tab-line-alternate-colors, Adam Porter, 2020/12/24