Juri Linkov writes: >>> Thanks, it would be nice to support displaying tabs in alternating >>> colors. But there are endless possibilities for look and feel of >>> tabs, so instead of hard-coding only one of them for alternating >>> colors, I suggest to add a customizable function with a name like >>> 'tab-line-tab-face' that with a tab provided as its arg (and a list of >>> tabs to be able to find the ordinal number of the given tab) would >>> return its face to use. >> >> Yes, that seems like a good idea. Something like this? I also added >> another face for non-file-backed buffers, which helps distinguish them. > > What if some users might want to display tabs with rainbow colors? > Then this too specific option tab-line-alternate-colors won't help. > > What I suggest is that defcustom tab-line-tab-face-function could > provide a separate function choice, e.g. tab-line-tab-face-alternate, > so when customized to tab-line-tab-face-alternate, this function > could call the default function tab-line-tab-face-default, > and if the default function returns 'tab-line-tab-inactive', > then replace it with 'tab-line-tab-inactive-alternate' > depending on whether the tab is odd/even. 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. This seems like a flexible mechanism which makes it possible to modify the faces orthogonally according to arbitrary criteria, and it can be used to add the alternating colors and special-buffer faces when applicable (when so-configured by the user). It could also be used to do a "rainbow" of faces, as you mentioned, etc. To address Eli's feedback, in this patch I also defined the alternate face to have a certain background color by default rather than inheriting from mode-line. However, the issue regarding italic slant on terminals remains; I'll be glad to do whatever you or Eli suggest. Thanks to you and Eli for your help.