Re: [PATCH] whitespace: fix initial-indent checking
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 16, 2007, 20:40 UTC
- Message-ID
- <7vodcqjrtw.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20071216035440.GM14377@fieldses.org>
"J. Bruce Fields" <bfields@fieldses.org> writes:
> One slightly weird thing about this: I'd expect indent-with-non-tab to > catch any sequence of 8 or more contiguous spaces, not just such > sequences at the end of the indent. This doesn't quite do that.
+-------+-------+-------+-------+-------+-------+-------+-------+-------+ Personally, I would hate that. That would muck with two spaces I deliberately typed after the full stop before this sentence). Please don't.
Emacs "M-x tabify" tends to do this and I found it unsuitable especially for code (I am not complaining, it probably was invented for other purposes and not reformatting code):
If you have original (the run of '>>..>>' is a single tab, '.' is a SP)
dcba....123
fedcba..123
gfedcba.123and "tabify" the region, you would get:
dcba>>>>123
fedcba>>123
gfedcba.123That is fine if you are shooting for minimum number of bytes, but often it is not what you want in your code, especially when the part that conains the whitespace "..cba 123.." is inside a string constant.