David,
I also am not too experienced with elisp, but here is the portion of my
.emacs that does what you are looking for:
--START--
(defun my-jde-mode-hook ()
(c-set-offset 'substatement-open 0))
(add-hook 'jde-mode-hook 'my-jde-mode-hook)
--END--
This works for me. Perhaps it will work instead of the format you
tried.
Hope this helps,
Ivan
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 ======
--
Ivan Brusic | "Computers are nothing but a perfect
E-mail: [EMAIL PROTECTED] | illusion of order" - Iggy Pop
Phone: (978) 262-0758 |