unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Adam Porter <adam@alphapapa.net>
Cc: emacs-devel@gnu.org
Subject: Re: [PATCH] tab-line-alternate-colors
Date: Mon, 14 Dec 2020 21:37:27 +0200	[thread overview]
Message-ID: <87360847c8.fsf@mail.linkov.net> (raw)
In-Reply-To: <878sa0u2hn.fsf@alphapapa.net> (Adam Porter's message of "Mon, 14 Dec 2020 04:05:24 -0600")

>> 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.

The only drawback of #2 is that when the user wants to completely
override all default faces, then calculating the default faces
is unnecessary, but its performance overhead is negligible.

For more optimization we could try also to add more args to the
face-returning functions, such args as 'selected-p', but OTOH, maybe
'selected-p' is not needed in tab-line-tab-face-inactive-alternating,
because it can just check if the arg 'face' from the previous function is
not 'tab-line-tab-current'.



  reply	other threads:[~2020-12-14 19:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-13  6:04 [PATCH] tab-line-alternate-colors Adam Porter
2020-12-13  6:17 ` Adam Porter
2020-12-13  8:45 ` Juri Linkov
2020-12-13 10:06   ` Adam Porter
2020-12-13 11:13     ` Adam Porter
2020-12-13 15:21     ` Eli Zaretskii
2020-12-14  2:17       ` Adam Porter
2020-12-14 15:34         ` Eli Zaretskii
2020-12-16  2:58           ` Adam Porter
2020-12-16 15:41             ` Eli Zaretskii
2020-12-13 21:25     ` Juri Linkov
2020-12-14  4:33       ` Adam Porter
2020-12-14  9:10         ` Juri Linkov
2020-12-14 10:05           ` Adam Porter
2020-12-14 19:37             ` Juri Linkov [this message]
2020-12-16  3:24               ` Adam Porter
2020-12-16  3:55                 ` Adam Porter
2020-12-16  9:03                 ` Juri Linkov
2020-12-16 10:26                   ` Adam Porter
2020-12-16 20:46                     ` Juri Linkov
2020-12-18  3:55                       ` Adam Porter
2020-12-23 21:07                         ` Juri Linkov
2020-12-24 11:26                           ` Adam Porter
2020-12-14  9:14         ` Adam Porter
2020-12-14 19:33           ` Juri Linkov

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=87360847c8.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=adam@alphapapa.net \
    --cc=emacs-devel@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 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).