help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tabs for indentation, spaces for alignment?


From: Anders Kaseorg
Subject: Tabs for indentation, spaces for alignment?
Date: Mon, 06 Nov 2006 15:51:49 -0500

As far as I can tell, Emacs is able to use either only spaces for
indentation and alignment:
        block {
        ....block {
        ........some_really_long_function_name(arg,
        .......................................arg);
or an "optimal" mixture of tabs and spaces for indentation and
alignment:
        block {
        --->block {
        --->--->some_really_long_function_name(arg,
        --->--->--->--->--->--->--->--->--->...arg);
which, of course, might not be so "optimal" to someone with a different
tab width:
        block {
        ----->block {
        ----->----->some_really_long_function_name(arg,
        ----->----->----->----->----->----->----->----->----->...arg);

You may prefer spaces or tabs for indentation, and that's fine, but you
have to agree that using tabs for alignment in this way is broken.  What
I really want is to use tabs for indentation and spaces for alignment:
        block {
        --->block {
        --->--->some_really_long_function_name(arg,
        --->--->...............................arg);
so that the indentation characters are semantically correct, and the
layout is independent of tab width:
        block {
        ----->block {
        ----->----->some_really_long_function_name(arg,
        ----->----->...............................arg);

Is there any way to get this behavior out of Emacs?

Anders







reply via email to

[Prev in Thread] Current Thread [Next in Thread]