[Python-Dev] Reindenting the C code base?

"Martin v. Löwis" martin at v.loewis.de
Sun Dec 14 21:42:10 CET 2008

> I've never figured out how to configure emacs to deduce whether the
> current file uses spaces or tabs and has a 4 or 8 space indent.

If it is now official policy that different files use different styles,
then I think it would be helpful to put Emacs variables at the end of
each file. See the end of Objects/unicodeobject.c for an example.

I'm not aware of a builtin function that adjusts c-mode automatically;
I could fine a package that does some basic guessing, though:


I've tried the second one briefly. It guesses c-basic-offset fairly
well, but doesn't attempt to guess indent-tabs. This one does; I haven't
tried it yet:



More information about the Python-Dev mailing list