When the time finally came to do some serious scripting, I naturally turned to XEmacs. I
was kind of surprised that there didn't
seem to be to a JavaScript mode, but not really. I've looked before; it didn't
exist then either. I did find two attempts on the
web, but neither looked like something I wanted to work with, so I decided to plunge ahead
and create my own, and "do it right".
As soon as I started, I discovered that one of the reasons no one else has "done this
right" yet is that writing modes for
programming languages is a lot more complicated than used to be back in the days when
everyone used Emacs 18.56. Indentation
support is in one place, font-lock support is in another, and every major release has a
different way of dealing with them. Gross!
Plus, it looks like this has become something of a political hot potato. Oh, well.
I'm quite happy with the improved
functionality, so I guess all the pain is worth it.
So I haven't really attempted to make this portable at all, yet. What I did do was
grab everything that looked useful from
java-mode, and modify it for JavaScript. Mostly this involved globally replacing
'java' with 'js' and hacking the keyword lists.
There's a lot of redundancy in the result, and I may have missed a few things that my
limited testing hasn't shown up yet. But
before I spend any more time an this, I may as well tap into the collective wisdom of the
group. Please send any suggestions you
might have about the best way to make the code more portable and less redundant.
I'd also like to go beyond the syntax, and add an inferior-js mode, with all the hooks
for JavaScript debugging that inferior-lisp
mode has for lisp debugging. But I'm not quite sure where to start working on that.
I don't even know if there are any JavaScript
implementations out there that work in a command-line mode, as opposed to living in a
web-browser. I'm also not sure whether I
should start working with ilisp, or inferior-tcl, or xscheme, or even jde as a model. Any
advice here would be much appreciated as
well.
Thanks
--
Paul F. Krause
paulkrause88(a)alum.mit.edu