Another way (don't know if it is kosher) is:
(setq default-tab-width 2)
Or, from Ingo's .emacs file:
;; Sets the basic indentation for Java source files
;; to two spaces.
(defun my-jde-mode-hook ()
(setq c-basic-offset 2))
(add-hook 'jde-mode-hook 'my-jde-mode-hook)
Myself, I like a setting of 4.
cheers -- Rick
Michael Hollfelder wrote:
>
> > > hour trying to find the answer. I give up. JDE's default indentation
> > offset is 4 spaces. I'd like to reduce it to 2. I tried setting, via
> > customeize-variable, c-basic-offset to 2, but that only works for until
>
> i put this in my .emacs file (after the jde load stuff, not
> sure whether that matters...) and it worked for me. there
> is more info in the mail archives.
>
> (defun my-jde-mode-hook ()
> (c-add-style
> "my-java"
> '("java"
> (c-basic-offset . 2)))
> (c-set-style "my-java"))
>
> (add-hook 'jde-mode-hook 'my-jde-mode-hook)
--
Rick Leir Supply Chain Solutions
Pelyco Systems http://www.pelyco.com
613 226 6109 [EMAIL PROTECTED]