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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: indenting


From: Billy N. Patton
Subject: Re: indenting
Date: Tue, 26 Oct 2004 13:04:46 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040623

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;




(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


--
   ___  _ ____       ___       __  __
  / _ )(_) / /_ __  / _ \___ _/ /_/ /____  ___
 / _  / / / / // / / ___/ _ `/ __/ __/ _ \/ _ \
/____/_/_/_/\_, / /_/   \_,_/\__/\__/\___/_//_/
           /___/
Texas Instruments ASIC Circuit Design Methodology Group
Dallas, Texas, 214-480-4455,  b-patton@ti.com


reply via email to

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