try putting this in your .emacs file, asomewhere fter the (require 'jde)
statement:

(defun my-java-mode-hook()
  "Hook for running Java file..."
  (message "Loading my-java-hook...")
   ;;don't indent braces
  (c-set-offset 'substatement-open 0))

(add-hook 'java-mode-hook     'my-java-mode-hook)


Hope this helps.

David Waite wrote:

> I am sorry, I have looked through all of the JDE manuals, the faq on the
> site, the www.emacs.org site and even went on irc to see if someone could
> help, and have hacked all day. I am trying to get the indentation for
>
> if (i)
>         {
>                 ....
>         }
>
> to be
>
> if (i)
> {
>         ....
> }
>
> I gathered I do this by changing substatement-open to 0 (from +). But my
> lack of experience with elisp gets me here.
>
> below are the relevant bits of my .emacs: (only cut out color-setting code).
> Any idea what I am doing wrong?
>
> -David Waite
>
> ====== .emacs ======
>
> (custom-set-faces
>  '(show-paren-mismatch-face ((((class color)) (:foreground "black"
> :background "red2"))))
>  '(show-paren-match-face ((((class color)) (:foreground "black" :background
> "green3")))))
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;; Highlighting.
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> (transient-mark-mode t)
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;; Paren matching
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
> (require 'paren)
> (show-paren-mode 1)
> (custom-set-faces
>  '(show-paren-match-face ((((class color))
>                            (:foreground "black" :background "green3"))))
>  '(show-paren-mismatch-face ((((class color))
>                               (:foreground "black" :background "red2")))))
>
> (defun my-jde-mode-hook ()
>   (c-add-style
>     "my-java"
>     '("java"
>       (substatement-open . 0)))
>   (c-set-style "my-java"))
>
> (add-hook 'jde-mode-hook 'my-jde-mode-hook)
>
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> ;; For JDE
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> l
>
> (setq load-path
>         (nconc
>
>                  "c:/devel/jde-2.1.6beta10/lisp"
>                  )
>                  load-path))
> (require 'jde)
>
> ====== end ======


begin:          vcard
fn:             Rich Johns
n:              Johns;Rich
org:            Trajecta
email;internet: [EMAIL PROTECTED]
title:          Software Designer
note:           [EMAIL PROTECTED]
x-mozilla-cpt:  ;0
x-mozilla-html: TRUE
version:        2.1
end:            vcard

Reply via email to