On Wed, Dec 2, 2009 at 6:42 PM, Eric M. Ludlam <eric@...> wrote:
>
> The problem is that the mode hook is used to setup parsing information, and
> then after that, the parser setup is done in the mode-local-init-hook.
>
> Semantic adds a 'semantic-init-hook' which you can use for when a buffer is
> setup for parsing. Thus:
>
> (add-hook 'semantic-init-hook
> (lambda () (when (eq major-mode 'my-mode)
> (semantic-idle-summary-mode)))))
>
> should do the trick, where my-mode is java-mode or jdee-mode or some-such.
>
Thanks for the fast reply. Unfortunately I'm having trouble making this work.
To rule out interference from my other emacs stuff I tried this:
Start emacs with --no-init and eval (using eval-region):
;; CEDET/semantic
(load-file "~/lib/elisp/cedet/common/cedet.el")
(semantic-load-enable-minimum-features)
(global-semanticdb-minor-mode 0)
(setq semanticdb-default-save-directory "~/semantic")
(require 'semantic-gcc)
;; use semantic for Java
(add-hook 'semantic-init-hook
(lambda () (when (eq major-mode 'java-mode)
(semantic-idle-summary-mode))))
After that I visit a java file and it loads
semantic-idle-scheduler-mode but not semantic-idle-summary-mode.
I can activate the mode manually as before.
What am I doing wrong?
Best Regards
Joel
|