[H-GEN] Emacs configuration hassles

Martin Pool mbp at linuxcare.com.au
Thu Jul 27 04:10:34 EDT 2000


[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics.  Please observe the list's charter.          ]

On Thu, Jul 27, 2000 at 05:35:21PM +1000, Ben Fowler wrote:
> Dear All,
> 
> I'm trying to get XEmacs to do my bidding but I'm having little luck
> 
> I like to indent my code at 8 spaces per tab, so I put something like the
> following in my .emacs file.
> 
> (set-custom-variables '(c-basic-offset 8))
> 
> (add-hook 'c-mode-hook (lambda () setq (c-basic-offset 8)))
> 
> No matter what I do, Emacs still insists on using a C indent distance of 2.
> How can I fix this?

I don't know about XEmacs, but in GNU emacs you'll want to look at the
`c-indentation-style' features.  As of 20.x, GNU emacs overrides C
indentation and formatting behaviour by an overall `style' like GNU,
K&R, BSD, etc.  So rather than setting all the variables by hand, you
might want to choose a default style instead.  Also, starting your 
files like this:

/*=                                     -*- c-file-style: "bsd" -*-
 * rproxy -- dynamic caching and delta update in HTTP
 * $Id: nad.c,v 1.14 2000/06/26 06:12:21 mbp Exp $

gets everything set up the right way.

Bon apetite,
-- 
Martin Pool, Linuxcare, Inc.
+61 2 6262 8990
mbp at linuxcare.com, http://www.linuxcare.com/
Linuxcare. Support for the revolution.

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.



More information about the General mailing list