[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: indenting
From: |
Stefan Monnier |
Subject: |
Re: indenting |
Date: |
Tue, 26 Oct 2004 20:35:41 GMT |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) |
>>>>> "Billy" == Billy N Patton <b-patton@ti.com> writes:
> Stefan Monnier wrote:
>>> I do not want tab characters.
>> Your (setq-default indent-tabs-mode nil) does that.
>>
>>> I want to be able to hit the tab key after I type int and i1. but the int
>>> indents and follows the tab. What I end up with is
>>> int i1 = 0;
>>> THis is no more readable than having everything shifted to the left.
>>> How can I stop this behavior?
>> Your (setq c-tab-always-indent nil) should have done that. Can you
>> describe
>> very pedantically precisely every little itsy bitsy detail of what you do,
>> what you expect, and what happens instead, as if you were talking to
>> a complete and total idiot ?
> I want to type:
> int<tab><tab>i1<tab><tab><tab><tab>= 0;
> char*<tab>a_pointer<tab><tab> = null;
> to end with
> int i = 0;
> char* a_pointer = null;
> but what I get now is:
> int i = 0;
> char* a_pointer = null;
I understand this part, but you left out tons of details, like:\
- how do you start Emacs?
- what version of Emacs?
- what buffer do you type this in (file name? how do you open it?)?
- what is the major mode of that buffer (C-h m tells you)?
- what's the value of c-tab-always-indent in that buffer?
...
When I do:
% emacs-21.2 -q --no-site-file --eval '(setq c-tab-always-indent nil)'
~/tmp/foo.c
int<tab><tab>i1<tab><tab><tab><tab>= 0;
I get a line like:
int i1 = 0;
which seems pretty close to what you want (except you'll probably want to
hit TAB a bit less often).
I suspect that your (setq c-tab-always-indent nil) is not executed (because
of an error earlier in your .emacs) or it is overruled by something.
Stefan