|
|
|
|
|
by kazinator
2547 days ago
|
|
If editors respected logical indentation levels, tabs would be more feasible. Consider a pair of lines like: printk(KERN_INFO "%s: blah, blah %d\n",
__func__, arg)
This will work okay like so: [tab][tab]printk(KERN_INFO "%s: blah, blah %d\n",
[tab][tab] __func__, arg)
If we change the tab size, the alignment is preserved.Problem is, many editors in "mixed tabs and spaces" mode wants to fill the second line with the maximum possible number of tabs, and minimum spaces. It has no idea that the two belong to the same nesting level. Say that we have four-space tabs. Then the editor does this: [tab][tab]printk(KERN_INFO "%s: blah, blah %d\n",
[tab][tab][tab] __func_, arg)
four of our alignment spaces turn to a tab, followed by three spaces for alignment.Even if your True Scotsman's editor is smarter than this, someone on the team will use something that isn't and mess things up. |
|