A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-December/084349.html below:

[Python-Dev] Reindenting the C code base?

[Python-Dev] Reindenting the C code base? [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:

http://members.iinet.net.au/~bethandmark/elisp/mst-guess-indentation.el
http://www.emacswiki.org/cgi-bin/emacs/guess-offset.el

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:

https://savannah.nongnu.org/projects/dtrt-indent/
http://git.savannah.gnu.org/gitweb/?p=dtrt-indent.git;a=blob_plain;f=dtrt-indent.el;hb=HEAD

Regards,
Martin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4