Toby Allsopp wrote:
> On Mon, Jun 18, 2001 at 09:49:57PM -0400, Bill Burke wrote:
>
>>Does anybody use emacs? We should have a java-mode specific to jboss.
>>
>
> Does anybody *not* use emacs? They wouldn't admit it anyway. Unless they
> use vi.
>
> I have a jboss style from when the standard was 3 spaces. If there's
> interest I can post it (when I get home) along with instructions on
> how to automatically activate it when editing JBoss sources.
Ok. As promised, here is the jboss style:
(c-add-style "jboss" '("java"
(c-basic-offset . 3)
(c-offsets-alist (substatement-open . 0)
(arglist-intro . +))))
This can be activated by the function c-set-style. This is bound to
"C-c ." by default.
The method I use for using this style automatically when working on
JBoss is to define a new major mode. I use the JDE
(http://jde.sunsite.dk/), so this is based on jde-mode, but you could
base it on java-mode just as easily.
(defun jboss-jde-mode ()
"JDE mode with JBoss coding style"
(interactive)
(jde-mode)
(c-set-style "jboss"))
(setq auto-mode-alist (cons '("/jboss/.*\\.java$" . jboss-jde-mode)
auto-mode-alist))
This means that whenever you open a java file with "jboss" as part of
its path you will get the new mode. You should probably pick a regex
that works for you because this won't work for any modules that don't
have a directory called jboss on the way to the source.
If you do all of your JBoss development out of /home/toby/cvs-jboss, for
example, you might want to change that regex to
"^/home/toby/cvs-jboss/.*\\.java$".
Toby.
P.S. I'm not volunteering to give emacs support to anyone, I'm sorry.
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development