[Top][All Lists]

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

Re: indentation in jde/java mode

From: ad
Subject: Re: indentation in jde/java mode
Date: Mon, 26 Apr 2004 22:15:51 -0400
User-agent: Pan/ (As She Crawled Across the Table (Debian GNU/Linux))

On Mon, 26 Apr 2004 08:30:36 +0000, Alan Mackenzie wrote:

> ad <> wrote on Sun, 25 Apr 2004 23:07:01 -0400:
>> Hi,
>> I am running "GNU Emacs 21.3.1" in my debian box. I have the following
>> in my ".emacs" file to use 2 char indentation for my java files:
>> (defun my-jde-mode-hook ()
>>      (setq c-basic-offset 2))
>> (add-hook 'jde-mode-hook 'my-jde-mode-hook)
>> (add-hook 'java-mode-hook 'my-jde-mode-hook)
>> This seems to be working fine when I edit/view files with emacs, but
>> when I look at the files with other editors or viewers, like "less", I
>> see the indentation is actually 8.
>> It seems like when the file is saved, the indentation is changing to
>> 8.
>> Am I doing something wrong within my ".emacs"?
> Quick question: are you sure that your indentation is done with two
> spaces, and not with a TAB, tab-width having somehow been set to 2?
>> Thank you.

While I am writing the code and get to the new-line and hit TAB, the
cursor does not move, but when I finished the line with ";" or having
a "." (dot) in the line (example (aClass.method), does the indentation
automatically, and it looks by 2 chars. I also tend to use "Java ->
Indent Expression" menu selection quite often which also looks like
indenting by 2 chars. All the indentation looks just fine (2-chars)
within the emacs, but opening with other editors (even "less") is
making it look like it was indented by 8 chars. Because of this, I get
some complaints from my colleagues that are using xemacs.

Thank you again

reply via email to

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