help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Emacs newbie - Syntax Highlighting and Indentation


From: Artur Hefczyc
Subject: Re: Emacs newbie - Syntax Highlighting and Indentation
Date: Sat, 15 Nov 2003 21:20:32 +0430
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)

David Rasmussen <address@hidden> writes:
> Most of you said that I should put somehting along the lines of
> (setq c-basic-offset 2)
> in my .emacs to alter the tab spacing and indentation. But it doesn't work?

It may not work if you put only above code, bacuse each major mode has
own definition for such variables. So you should set this variable
_for_ _java_ mode in your case.

You should use mode hook as described in my previous post. Put those
code in your .emacs file and try it then. (You should restart emacs
after modyfing .emacs)
I checked it before minute and it worked for me.

If it still doesn't work for you it might mean you doesn't use java
mode by default for java files. Maybe jde mode then?
To see what is your major mode during editing java files you should
open java file under emacs and then execute emacs function
'describe-mode' in following way:

M-x describe-mode
(press: 'Alt-x' and write function name: 'describe-mode' and press
<ENTER>)
New window should appear with 3rd non empty line:

Java mode:

It is 'Jde mode:' on my installation.
Please let me know if you successed or not.

Artur
-- 
Artur Hefczyc, Open Source Developer:
http://www.geotools.org/
http://generguide.sourceforge.net/
http://wttools.sourceforge.net/
http://maven-plugins.sourceforge.net/


reply via email to

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