Source editing standards: Modeline (Re: [28702] trunk/base/HACKING)

Kevin Ballard eridius at macports.org
Mon Sep 10 15:51:50 PDT 2007


On Sep 10, 2007, at 6:18 PM, Juan Manuel Palacios wrote:

> 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?
>>
>> Greetings,
>> Jochen
>>
>
> 	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 -*- vim:noet:sw=8:ts=8
>
> 	Any objections to those? Something to add? Is casing of keywords  
> right (Tcl or tcl)?

I don't know if it makes a difference, not being an Emacs person, but  
I think the Mode keyword is supposed to come first. Also we should  
probably have file encoding in the modeline

# -*- Mode: Tcl; coding: utf-8; tab-width: 4; indent-tabs-mode: nil;  
c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4

> 	Once we agree on the exact formats we should document them and  
> everyone should stick to them, even in the order of the components.

-- 
Kevin Ballard
http://kevin.sb.org
eridius at macports.org
http://www.tildesoft.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-dev/attachments/20070910/cb76b3a0/attachment.html


More information about the macports-dev mailing list