On Mon, 16 Oct 2000, Peter Schuller wrote:

> > I've been doing my Java development using emacs (actually xemacs) but am
> > considering switching over to Forte (nee netbeans).
> 
> Personally I'd go for Forte simply because I have not been able to make
> xemacs/eamacs indent with hard tabs instead of spaces. But other than that,

eh? A tab is of course 8 chars and if you set the "c-basic-offset" to 8 it
will use tab (unless it needs to indent less than one complete offset step
somewhere). For 4 space tab, something like this in the .emacs:

(defun my-java-mode-hook ()
    (progn
         (c-set-style "java")
         (setq c-basic-offset 4)
         (setq tab-width 4)
         )
  )
(add-hook 'java-mode-hook 'my-java-mode-hook)

[edited from my .emacs, it may be broken. I do not use 4 space tabs, they 
 are broken as well.]

You may want to set c-tab-always-indent to nil, that makes it indent
normally when to the left of any text (space+tab mixed if 4 space indent
level and 8 space tab) and else insert normal tabs.


> Oh and btw, if anyone knows how to make emacs indent with hard tabs (short
> of re-writing parts of the e-Lisp), please tell me and I'll go over to emacs
> in a second...

If the above wasn't what you are after, feel free to continue this
off-list as we are moving dangerously far off topic.

'M-x describe-key [press key]' is a good place to start looking for emacs
help on keybindings when in some special mode.

/Urban


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to