mercurial/crew at 13301: 6 outgoing changesets

Martin Geisler mg at aragost.com
Thu Jan 27 01:59:28 CST 2011


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.

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.

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

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/en/services/mercurial/blog/


More information about the Mercurial-devel mailing list