Eli Zaretskii writes: >> From: Hong Xu >> 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() >> { >> 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() >> { >> 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. Thanks. Is there a single command to do formatting though? I think people want to format the line more than simply "indent" the line. Hong