Source editing standards: Modeline (Re:  trunk/base/HACKING)
Juan Manuel Palacios
jmpp at macports.org
Mon Sep 10 15:18:35 PDT 2007
On Sep 9, 2007, at 4:48 PM, Jochen Küpper wrote:
> On 07.09.2007, at 20:34, source_changes at macosforge.org wrote:
>> + # -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-
>> basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
> Shouldn't there be a "coding: utf-8" in there, at least for Portfiles?
So, we need to come to a final agreement on the modelines we're
going to impose/request in our source files/Portfiles:
1) Source files: # -*- coding: utf-8; Mode: Tcl; tab-width: 4; indent-
tabs-mode: nil; c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
2) Portfiles (it's the same as above, is that recommended?): # -*-
coding: utf-8; Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-
basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
3) Makefiles: # -*- Mode: Makefile; tab-width: 8; indent-tabs-mode: t
Any objections to those? Something to add? Is casing of keywords
right (Tcl or tcl)?
Once we agree on the exact formats we should document them and
everyone should stick to them, even in the order of the components.
PS: Actual conversion of the files will probably be implemented on a
file by file basis, unfortunately, as a regex to convert everything
in one fell swoop is very difficult to construct and very error
prone, I believe (as also advised by Kevin).
More information about the macports-dev