|
From: | Dmitry Gutov |
Subject: | bug#20322: 25.0.50; indent-tabs-mode should default to nil |
Date: | Wed, 15 Apr 2015 05:08:22 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Thunderbird/36.0 |
On 04/15/2015 04:19 AM, Stefan Monnier wrote:
However, the implementation seems to do the right thing:https://github.com/outsideris/popularconvention/blob/master/src/parser/js-parser.coffee#L99-L100This seems to count the number of lines which start with a SPC and those which start with a TAB.
That sounds right. But I'd say the projects that mix tabs and spaces must be a minority among those that use tabs at all.
If your indentation rules use an indentation step of 2, you'd likely get many more lines that start with SPC regardless of indent-tabs-mode (just because most lines of code are less indented than 8 columns).
I don't actually recall seeing code intentionally mixing tabs and spaces like that, ever, before looking at Emacs's sources.
So, I don't think it does the right test. I think the right test would be tab = /^\t/ space = /^\s\s\s\s\s\s\s\s/
That would be more correct indeed. Again, if you think the results of this can matter in some future decision, I can spend the time to apply the fix, deploy it myself and rerun the analysis.
[Prev in Thread] | Current Thread | [Next in Thread] |