Subject: bug#68441: Fix the unaligned tab in whitespace mode

From: Eli Zaretskii <[email-masked]>
Date: Sun, 14 Jan 2024 12:14:38 +0200

> From: Young Arto <[email-masked]>
> Date: Sat, 13 Jan 2024 12:23:27 +0000
> msip_labels: 
> 
> There is a bug in whitespace mode which used the display table to
> replace a tab with a tab-mark vector.
> 
> If we has a line like this:
> ------
> 123\t5678
> ------
> 
> If tab-width is 4 and tab-mark is [?> ?\t],
> The line will be displayed as following:
> (we use '^' to represent tab extra spaces)
> ------
> 123>^^^^5678
> ------
> 
> However, it should be displayed as:
> ------
> 123>5678
> ------

I'm not sure I agree.  We never display a TAB as nothing, no matter if
it comes from a display vector or from a buffer or from any other
source.

So this patch changes long-standing behavior in non-trivial ways, and
I'm not sure what it can break, after so many years.  I understand
that it makes certain customizations in whitespace-mode look better on
display in some cases, but display-tables are used in Emacs not just
in whitespace-mode.

Thanks.