[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: replace TAB with 8 whitespaces
From: |
Kai Großjohann |
Subject: |
Re: replace TAB with 8 whitespaces |
Date: |
Mon, 16 Jun 2003 09:26:43 +0200 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
"jinneemop" <jinneemop@isee.zju.edu> writes:
> On Fri, 13 Jun 2003 09:00:26 +0200, Kai Großjohann wrote:
>
>> [x] Something interesting, please specify: It seems like one tab
> and one space.
It inserts a tab and a space? That's strange. Is it always like
this, or only in some situations. Note the following snippet:
int main(int argc, char* argv[])
{
int a;
printf("some %string\n",
argv[0]);
}
Here, the "argv[0]" line will be indented in such a way that it
aligns with the parenthesis above. This means that the indentation
depends on the length of the function name "printf". For example, if
it was "fprintf", then the indentation would be one column more.
Further, Emacs uses an optimum mix of tabs and spaces to achieve the
desired indentation. In the above example, the argv[0] line needs to
be indented 15 columns, and since a tab is eight columns wide, the
optimum mix is one tab and 7 spaces.
This behavior can be controlled with the variable indent-tabs-mode.
Type M-x customize-variable RET indent-tabs-mode RET to change it.
If indent-tabs-mode is nil (off, false), then Emacs will use 15
spaces instead of 1 tab plus 7 spaces in the above case -- Emacs will
never use tabs for indentation when indent-tabs-mode is off.
Does that explain Emacs' behavior? Does changing indent-tabs-mode
achieve what you want?
--
This line is not blank.
- replace TAB with 8 whitespaces, jinneemop, 2003/06/12
- Re: replace TAB with 8 whitespaces, Peter J. Acklam, 2003/06/12
- Re: replace TAB with 8 whitespaces, Henrik Enberg, 2003/06/12
- Re: replace TAB with 8 whitespaces, Alan Mackenzie, 2003/06/13
- Re: replace TAB with 8 whitespaces, Kai Großjohann, 2003/06/13
- Re: replace TAB with 8 whitespaces, jinneemop, 2003/06/16
- Re: replace TAB with 8 whitespaces,
Kai Großjohann <=
- Re: replace TAB with 8 whitespaces, jinneemop, 2003/06/16
- Minibuffer and Dabbrev problems, K T Ligesh, 2003/06/16
- Re: replace TAB with 8 whitespaces, Kai Großjohann, 2003/06/16
- Re: replace TAB with 8 whitespaces, Stefan Monnier, 2003/06/16
- Message not available
- Re: Minibuffer and Dabbrev problems, Kai Großjohann, 2003/06/16
- Re: Minibuffer and Dabbrev problems, Johan Bockgård, 2003/06/16
- Re: Minibuffer and Dabbrev problems, K T Ligesh, 2003/06/16
- Message not available
- Re: Minibuffer and Dabbrev problems, Kevin Rodgers, 2003/06/17
- Re: Minibuffer and Dabbrev problems, K T Ligesh, 2003/06/18
- Message not available
- Re: Minibuffer and Dabbrev problems, Kai Großjohann, 2003/06/18