[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: indent-tab-mode
From: |
Tassilo Horn |
Subject: |
Re: indent-tab-mode |
Date: |
Sat, 30 Sep 2006 23:33:15 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
Gary Wessle <phddas@yahoo.com> writes:
Hi Gary,
> my indent-tab-mode is on but when I am writing in sh mode
>
> #!/bin/sh
> if [ ... ]
> then
>
> the "then" is not indented automatically. how can I fix this?
`indent-tab-mode' has nothing to do with how the indention of certain
programming language constructs looks like. If it's non-nil, indentation
uses tabs, if it's nil it uses spaces.
,----[ C-h v indent-tabs-mode RET ]
| indent-tabs-mode is a variable defined in `C source code'.
|
| [...]
|
| Documentation:
| *Indentation can insert tabs if this is non-nil.
| Setting this variable automatically makes it local to the current buffer.
`----
I think it's quite common not to indent `then':
,----
| if [...]
| then
| do-this
| do-that
| done
`----
Another common style is:
,----
| if [...]; then
| do-this
| do-that
| done
`----
Bye,
Tassilo
--
My opinions may have changed, but not the fact that I am right.
- indent-tab-mode, Gary Wessle, 2006/09/30
- Re: indent-tab-mode,
Tassilo Horn <=