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

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

Re: Indentation settings problems


From: TriKri
Subject: Re: Indentation settings problems
Date: Sat, 3 Oct 2009 12:56:06 -0700 (PDT)

I have a question about another indentation setting: When you set
indent-tabs-mode to t, multiple spaces are replaced with tabs. But what if
you only want the part of the indentation that comes from the c-basic-offset
to be tabs, and the rest spaces? Say for example that we have the code

int main() {
        if (foo &&
            bar) {
                foo_bar();
        }
        return 0;
}

You can see that the indentation consists of only tabs but before "bar) {".
This is because bar should always be lined up with foo, hence bar has to be
4 spaces from the start of "if". Tabs can't be used here, since opening the
code in another text editor with another tab width would result in a
misalignment between foo and bar.

With my settings, these 4 spaces would be replaced with a tab, since my tab
width is set to 4. But this part of the indentation should always have the
width 4 which it doesn't if tabs are used here. So, how can I make these 4
spaces be precisely spaces, and not become a tab? Is there any setting for
this?
-- 
View this message in context: 
http://www.nabble.com/Indentation-settings-problems-tp25520490p25732211.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





reply via email to

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