[syslinux] Thank you and patch line length
H. Peter Anvin
hpa at zytor.com
Sat Feb 28 16:31:15 PST 2009
Gene Cumm wrote:
>> For plaintext, typically the line break should be around 72 characters,
>> with 79 as the absolute maximum. It's not an exact science for me; what
>> tends to happen is that I edit in emacs and then find myself with an
>> overlong line, and I just hit emacs "reformat paragraph" command.
>
> OK, that makes sense. I had thought I kept it under 80 but that explains it.
I believe you had, but I thought it looked a bit lopsided compared to
the text aroundit.
>> For code, do follow SubmittingPatches and keep the line length to < 80.
>> As far as indentation level, I'm not as picky as Linus; I've used both
>> 4 and 8 spaces myself, and in some cases even just 2; I've considered
>> doing a tree-wide reformat to either 4 or 8 spaces but haven't bothered.
>
> There's another question: with indentation, tabs versus spaces. I've
> typically been in the habit of using tab characters and letting my
> editor assume a tab size of 8. I notice that some of the files use
> tabs versus others using spaces. I'd assume just different stages of
> when each file was started and it's a low priority to be consistent.
>
> I would think that it'd be better to use tabs across the board with
> the assumption that they count as 8 characters when computing line
> length but allows someone to view it at whatever width they like. At
> one point, I had decided that I liked having my tab width at 2 to take
> up less space on my screen but this cause issues when most people
> around me used 8 (including the console) so I switched back.
That only really works, though, if you use tabs only to mark indentation
and not, for example, to make comments line up. As a result, I
recommend treating tabs simply as compressed spaces with the tab width
being 8, regardless of indentation level.
>> However, please try to be consistent within a file.
>
> That just makes complete sense.
:)
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
More information about the Syslinux
mailing list