Subject: bug#15875: 24.3.50; diff-mode counts first column when determining tab width

From: Stefan Monnier <[email-masked]>
Date: Tue, 12 Nov 2013 10:49:25 -0500

severity 15875 wishlist
thanks

> In diff-mode, When determining how many columns wide a given tab
> character should be, the calculation should happen as thought the second
> column were the first.

Indeed.  Maybe we could get something like that by adding a `tab-offset'
so that TAB chars insert a strechable space to the next
(+ (* tab-width N) tab-offset) instead of just the next (* tab-width N).

Then we can make diff-mode set this tab-offset based on whether we're
looking at a unified or plain or context diff (or a Git-style
multi-diffs, i.e. unified but with more than 2 versions, where each
additional version adds a column of +/-).

Note that diff-mode also handles diffs that have a mix of context-style
and unified-style hunks, but such a tab-offset feature wouldn't be able
to handle it correctly.  Not a big issue, tho.

        Stefan