mercurial/crew at 13301: 6 outgoing changesets

Adrian Buehlmann adrian at cadifra.com
Thu Jan 27 02:49:15 CST 2011


On 2011-01-27 08:59, Martin Geisler wrote:
> Matt Mackall <mpm at selenic.com> writes:
> 
>> On Wed, 2011-01-26 at 13:00 +0100, Mercurial Commits wrote:
>>> http://hg.intevation.org/mercurial/crew/rev/613b8bd2284e
>>> changeset:   13297:613b8bd2284e
>>> user:        Martin Geisler <mg at aragost.com>
>>> date:        Wed Jan 26 12:05:01 2011 +0100
>>> summary:     specify C indention style using Emacs file local variables
>>
>> Yuck.

Agreed. I was close to send an email it about myself.

Near as I can tell, neither the Linux kernel sources nor the C sources
for CPython do something similar.

> Why don't you like this? This style is something that is (somewhat)
> enforced by check-code and so I find it very natural that the files
> themselves specify the necessary settings for common editors.

Depends on the definition of common. My editors here I use don't know
about the comment blocks you inserted and I doubt common editors on
Windows do so.

>> I think it'd be better if people tweaked their .emacs with something
>> like this (untested):
>>
>> (defun hg-c-mode ()
>>   "C mode with adjusted defaults for use with Mercurial source."
>>   (interactive)
>>   (c-mode)
>>   (c-set-style "linux")
>>   (setq show-trailing-whitespace 't)
>>   (setq c-basic-offset 8))
>>
>> (setq auto-mode-alist (cons '("mercurial/.*\\.[ch]$" . hg-c-mode)
>>                        auto-mode-alist))
> 
> Yes, that might work, but why require everybody to do that when we can
> solve it out of the box with file variables?
> 

Because not everybody likes to have to look at these ugly comment blocks
in the sources?

Let's simply revert this change and move on, so we can do something more
interesting.


More information about the Mercurial-devel mailing list