I have set my indentation to 3 spaces. Unfortunately, when I create
a new Java class, it uses 4 spaces and will use 4 spaces from
that point forward. If I close emacs and re-open the file, it
will use 3 spaces. If I had files open previously (getting 3
spaces) and then create new Java file, everything then uses 4
spaces.
Obviously, something is wrong in my environment.
I am using GNU Emacs 20.7.1 on a windows platform and JDE 2.2.6.
My _emacs file (which probably has a lot of extra junk in it) is
as follows:
(add-to-list 'load-path "c:/opt/elib-1.0")
(add-to-list 'load-path "c:/opt/speedbar-0.13a")
(add-to-list 'load-path "c:/opt/semantic-1.3.2")
(add-to-list 'load-path "c:/opt/eieio-0.15")
(setq load-path (cons "c:/opt/jde-2.2.6/lisp" load-path))
(autoload 'speedbar-frame-mode "speedbar" "Popup a speedbar frame" t)
(autoload 'speedbar-get-focus "speedbar" "Jump to speedbar frame" t)
(defun alex-java ()
(c-add-style "alex-java"
'("java"
(c-basic-offset . 3)
(indent-tabs-mode . nil)
(default-tab-width . 3)
(tab-width . 3)
))
(c-set-style "alex-java")
(c-set-offset 'case-label '+)
(c-set-offset 'substatement-open 0)
(c-set-offset 'topmost-intro-cont '++)
)
(add-hook 'jde-mode-hook 'alex-java)
(add-hook 'c-mode-common-hook
(function (lambda ()
(setq-default c-basic-offset 3)
(setq c-basic-offset 3)
(setq indent-tabs-mode nil)
(setq default-tab-width 3)
(setq tab-width 3)
(c-set-style "java")
(c-set-offset 'case-label '+)
(c-set-offset 'substatement-open 0)
(c-set-offset 'topmost-intro-cont '++)
))
)
(set-background-color "black")
(set-foreground-color "green")
(set-cursor-color "white")
(custom-set-faces)
(require 'jde)
R. Alexander Milowski FAX: (707) 598-7649 [EMAIL PROTECTED]
"The excellence of grammar as a guide is proportional to the paucity of the
inflexions, i.e. to the degree of analysis effected by the language
considered."
Bertrand Russell in a footnote of Principles of Mathematics