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

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

Re: How to make c-indent-line-region respect indent-tabs-mode when it's


From: Eli Zaretskii
Subject: Re: How to make c-indent-line-region respect indent-tabs-mode when it's already aligned?
Date: Sat, 30 May 2015 17:22:10 +0300

> From: Hong Xu <hong@topbug.net>
> Date: Sat, 30 May 2015 01:28:13 -0700
> 
> Currently it seems that c-indent-line-region ignores the value of
> indent-tabs-mode. For example, I have the following in a buffer
> 
>     int main()
>     {
>     <Tab>int x;
>     }
> 
> and my indent-tabs-mode is nil. If 8 spaces is what expected, calling
> c-indent-line-or-region would do nothing. However, if it's not aligned
> 
>     int main()
>     {
>     <Tab>   int x;
>     }
> 
> calling c-indent-line-or-region would correct the tab with appropriate
> number of spaces.
> 
> Is there a different line indentation function which respects
> indent-tabs-mode even the line is already aligned?

You are using the wrong command.  You should use untabify to convert
tabs to spaces, or tabify to do the opposite.



reply via email to

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