[Top][All Lists]

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

Re: changing default indent for C++

From: Kai Großjohann
Subject: Re: changing default indent for C++
Date: Mon, 10 Feb 2003 07:38:35 +0100
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50

exits funnel <> writes:

> I'm a new Emacs user.  I'm using it primarily to write c++/Java on
> RedHat Linux.  So far I love it though there is one thing which
> annoys me.  The default indentation is four spaces.  I'd desparately
> like to change it to two.  Learning LIST is on my todo list but in
> the mean time, How can I do this?  Thanks in advance.

(defun ef-c-setup ()
  (setq c-basic-offset 2))
(add-hook 'c-mode-hook 'ef-c-setup)
(add-hook 'c++-mode-hook 'ef-c-setup)

The above does it for C and C++ -- I'm sure you can do Java yourself.
A turnip curses Elvis

reply via email to

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