Am Di, den 06.07.2004 schrieb Roman Kennke um 22:19:
> > > Together with Michael I have put together an emacs configuration
> > > hook, which enables GNU style auto-completion in Emacs with JDEE.
>
> > I found a bug: It wants to indent the { } for method/constructor
> > bodies for 2 spaces too, but these must he like for classes and
> > interfaces have the same depth as the starting line. I hope you
> > understand my explanation.
>
> I understand. But I don't have this problem. You use XEmacs? Maybe it is
> related to this? With GNU Emacs everything seems to work fine.
> However, I think, I can tweak this stuff a little, and send an update
> soon.Ok now, here we go. Attached is an improved version, which defines to commands: enable-javagnu and disable-javagnu these commands (invoked with M-x enable-javagnu RET) allow you to enable and disable this special GNU-helper mode. Michael, I hope we can tweak this file for XEmacs tomorrow :) Best regards, Roman
(defconst javagnustyle
'((c-hanging-braces-alist '((block-open before after)
(brace-list-open)))
(c-basic-offset . 2)
)
)
(defun enable-javagnu ()
(interactive)
;; remember old values
(setq javagnu-c-auto-newline c-auto-newline)
(setq javagnu-indent-tabs-mode indent-tabs-mode)
(setq javagnu-jde-gen-k&r jde-gen-k&r)
(setq javagnu-jde-gen-comments jde-gen-comments)
; auto-newline mode on
(setq c-auto-newline t)
; indent spaces instead of tabs
(setq indent-tabs-mode nil)
; GNU style braces placement in templates
(setq jde-gen-k&r nil)
; supress generate comments
(setq jde-gen-comments nil)
(jde-abbrev-mode)
(c-add-style "user" javagnustyle t)
(c-set-style "user")
)
(defun disable-javagnu ()
(interactive)
;; restore old values
(setq c-auto-newline javagnu-c-auto-newline)
(setq indent-tabs-mode javagnu-indent-tabs-mode)
(setq jde-gen-k&r javagnu-jde-gen-k&r)
(setq jde-gen-comments javagnu-jde-gen-comments)
(c-set-style "java")
)
;; uncomment the following line to automatically enable Java-GNU-mode
;; on JDE-startup
;(add-hook 'jde-mode-hook 'enable-javagnu)
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/classpath

