From: Tassilo Horn <heimdall@uni-koblenz.de>
Subject: Re: indent-tab-mode
Date: Sat, 30 Sep 2006 23:33:15 +0200 [thread overview]
Message-ID: <87psddujj8.fsf@baldur.nicundtas.de> (raw)
In-Reply-To: m3r6xt5aop.fsf@localhost.localdomain
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.
next prev parent reply other threads:[~2006-09-30 21:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-30 21:03 indent-tab-mode Gary Wessle
2006-09-30 21:33 ` Tassilo Horn [this message]
2006-10-01 19:25 ` indent-tab-mode Gary Wessle
2006-10-01 19:55 ` indent-tab-mode Peter Dyballa
2006-10-01 20:25 ` indent-tab-mode s. keeling
2006-10-02 0:37 ` indent-tab-mode Gary Wessle
2006-10-11 11:57 ` indent-tab-mode Sam Peterson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87psddujj8.fsf@baldur.nicundtas.de \
--to=heimdall@uni-koblenz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).