Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Dec 1995 15:14:04 -0800
From:      patl@asimov.volant.org
To:        FreeBSD-Questions@FreeBSD.ORG, chuckr@glue.umd.edu
Subject:   Re: xemacs
Message-ID:  <9512022314.AA04953@asimov.volant.org>

next in thread | raw e-mail | index | archive | help
|>  I am learning emacs unwillingly, at the behest of of the cs department, 
|>  and I have to figure out how to set up the C language indentation to work 
|>  in the style I like.  It wants to do:
|>  
|>  funcname( parm-list )
|>      {
|>          func-body;
|>      }
|>  
|>  I want it to do like I do in vi, where I use tabbing only (never 
|>  spacing), with tabs=4, and the form:

**Soapbox mode: on**

	Changing the number of spaces that a TAB character is equivalent
	to is EVIL.  There are far too many tools that assume that TAB=8.
	
**Soapbox mode: off**

That having been said, the good news is that emacs will let you type
TAB and then indent the proper amount.  And it provides tabify and
untabify functions to convert TABS to spaces and spaces to optimal
TABS+spaces.

|>  funcname( parm-list )
|>  {
|>  	func-body;
|>  }

Check out M-x set-c-style.  If you don't like any of the canned styles
avaliable, look in c-mode.el to see how to add your own or individually
set the variables.

|>  I do like the way it highlights, in color or font, the various parts of
|>  the code, but I want it to format MY way.  Can anyone help me?  I can 
|>  find how the indentation engine works in the info docs, but I can't see 
|>  how to change it.

More detailed questions should be taken to an emacs forum - try comp.emacs,
comp.emacs.xemacs, or gnu.emacs.help.


-Pat



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9512022314.AA04953>