all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: kai.grossjohann@gmx.net (Kai Großjohann)
Subject: Re: replace TAB with 8 whitespaces
Date: Mon, 16 Jun 2003 09:26:43 +0200	[thread overview]
Message-ID: <84r85ufpos.fsf@lucy.is.informatik.uni-duisburg.de> (raw)
In-Reply-To: pan.2003.06.16.12.51.18.367395@isee.zju.edu

"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.

  reply	other threads:[~2003-06-16  7:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-12 16:49 replace TAB with 8 whitespaces jinneemop
2003-06-12 17:19 ` Henrik Enberg
2003-06-12 17:26 ` Alan Mackenzie
2003-06-12 17:34 ` Peter J. Acklam
2003-06-13  7:00 ` Kai Großjohann
2003-06-16 12:51   ` jinneemop
2003-06-16  7:26     ` Kai Großjohann [this message]
2003-06-16 19:52       ` jinneemop
2003-06-16 12:36         ` Minibuffer and Dabbrev problems K T Ligesh
2003-06-16 13:17         ` replace TAB with 8 whitespaces Kai Großjohann
2003-06-16 13:53         ` Stefan Monnier
     [not found]         ` <mailman.7972.1055767014.21513.help-gnu-emacs@gnu.org>
2003-06-16 15:11           ` Minibuffer and Dabbrev problems Kai Großjohann
2003-06-16 17:25             ` Johan Bockgård
2003-06-16 23:02               ` K T Ligesh
2003-06-17 17:39           ` Kevin Rodgers
2003-06-18 12:11             ` K T Ligesh
     [not found]             ` <mailman.8150.1055940540.21513.help-gnu-emacs@gnu.org>
2003-06-18 16:33               ` Kai Großjohann
2003-06-18 19:29                 ` Stefan Monnier
2003-06-18 23:30               ` Kevin Rodgers

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84r85ufpos.fsf@lucy.is.informatik.uni-duisburg.de \
    --to=kai.grossjohann@gmx.net \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.