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

Jochen Küpper jochen at fhi-berlin.mpg.de
Tue Sep 11 03:15:11 PDT 2007


Please forward to macports-dev at lists.macosforge.org, as I am not  
subscribed there  (Cannot post)

On 11.09.2007, at 00:51, Kevin Ballard wrote:

>> 	Any objections to those? Something to add? Is casing of keywords  
>> right (Tcl or tcl)?

Shouldn't matter; personally I lower-case these. The mode is actually  
called "tcl-mode" (not Tcl-mode) in Emacs. Therefore it should be  
lower-cased for clarity.

> 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.

Actually: no.
In principle it does also not matter, but many put the coding first,  
because that is the order in which that needs to be know. First you  
"decode" the file, then you switch to a mode, then you customize  
that... For vim you actually have the encoding first as well;)

> Also we should probably have file encoding in the modeline

Right, also for vim.

Thus we get this line:

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

Greetings,
Jochen
-- 
Einigkeit und Recht und Freiheit                http://www.Jochen- 
Kuepper.de
     Liberté, Égalité, Fraternité                GnuPG key: CC1B0B4D
         Sex, drugs and rock-n-roll


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.macosforge.org/pipermail/macports-dev/attachments/20070911/bad92605/PGP.bin


More information about the macports-dev mailing list