I do my jde-mode-hook inline this way:
(add-hook 'jde-mode-hook
(function (lambda ()
(delete-selection-mode t)
; (c-set-offset 'case-label '+)
; (c-set-offset 'substatement-open '0)
; (c-set-offset 'label '0)
; (c-set-offset 'statement-cont '+)
(setq indent-tabs-mode nil)
(setq comment-column 80)
(c-add-style "my-java" '("java"
(c-basic-offset . 4)
(c-comment-only-line-offset . (0 . 0))
;; the following preserves Javadoc
starter lines
(c-hanging-comment-starter-p . nil)
(c-offsets-alist . (
(inline-open . 0)
(topmost-intro-cont
. +)
(statement-block-intro . +)
(knr-argdecl-intro
. 5)
(substatement-open
. 0)
(label
. 0)
(statement-case-open . +)
(statement-cont
. 0)
(arglist-intro .
c-lineup-arglist-intro-after-paren)
(arglist-close .
c-lineup-arglist)
(access-label . 0)
(inher-cont .
c-lineup-java-inher)
(func-decl-cont .
c-lineup-java-throws)
))))
(c-set-style "my-java")
(auto-fill-mode -1)
(imenu-add-to-menubar "Find")
(message "Performed jde-mode-hook")
)))
When the one too-long line is unwrapped, it works for me.
Good luck and have fun! - Bob
--
"I did not ask for the anal probe" -- Passion Fish
"Discipline is never an end in itself, only a means to an end." - King
Crimson
"Whoever flees history will be pursued by history." - Janusz Korczak
Bob Hays | Aviva Kramer
---------------------------------------+--------------------------------
[EMAIL PROTECTED] (home) | [EMAIL PROTECTED] (home)
[EMAIL PROTECTED] (work) |
http://homepage.interaccess.com/~rhays |
> -----Original Message-----
> From: Laurent Guiraud [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 23, 1999 4:27 AM
> To: [EMAIL PROTECTED]
> Subject: jde-mode-hook is not called
>
>
> Hi JDE experts,
>
> I have got XEmacs NT 21.2b15, jde 2.1.6b3.
>
> I would like to have my own indentation style and my .emacs file
> contains the following lines:
>
> **********
>
> (require 'jde)
>
> (defun my-jde-mode-hook ()
> (c-add-style "my-java" my-c-style t)
>
> (c-set-style "my-java" my-c-style t)
>
> (message " .................... my-jde-mode-hook function executed
> .................."))
>
> (add-hook 'jde-mode-hook 'my-jde-mode-hook)
>
>
> ***************
>
> The problem is that my hook is never called !
>
> I also tried to use 'jde-mode-hooks but I have the same behavior.
>
> Thanks for your help,
>
> Laurent.
>
>
>
>
>