help-gnu-emacs
[Top][All Lists]
Advanced

[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 17:14:16 GMT
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

> 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 ?

> (add-hook 'c++-mode-hook '(lambda () (setq indent-tabs-mode nil)))
                          ^^^
This quote is at best unnecessary.  Better remove it.

> (setq-default indent-tabs-mode nil)

Actually with this default setting your `add-hook' above should not be
necessary at all.

> ;(setq c-tab-always-indent t)

A single ; is indented to comment-column (trying hitting TAB, just for fun).
Use ;; instead.


        Stefan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]