emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why js2-mode in Emacs 23.2?


From: Deniz Dogan
Subject: Re: Why js2-mode in Emacs 23.2?
Date: Mon, 10 Aug 2009 08:46:51 +0200

2009/8/10 Stefan Monnier <address@hidden>:
>>> Why not fix bugs in js2-mode? Having two packages providing similar
>>> features is a burden to maintainers as well as users.
>
>> Because js2-mode is an abomination? Oh, it's not so bad that it's slow
>> and unmaintained: that description applies to lots of code in Emacs.
>> The problem is that js2-mode operates fundamentally differently from
>> other modes, eschews font-lock, parses the buffer *asynchronously*,
>> and generally goes against every possible convention for implementing
>> a major mode.
>
> Here's the story as I remember it: a year or two ago, someone asked for
> a Javascript major mode to be included.  It sounded like a good idea,
> and some people pointed out the then-brand-new js2-mode which was pretty
> impressive featurewise.
> Then time passed and js2-mode didn't get installed early enough.  So it
> finally got installed recently.  I think it's good.  AFAIK its author is
> still around and maintaining it (he's the one who installed it into the
> CVS and he made some changes at this occasion, such as bringing all the
> code into a single file).
> So I do believe js2-mode is maintained.  Also, while it it unusual,
> I think it's a very interesting experiment in how Emacs could evolve
> (similarly to CEDET).

Yes, it seems to be maintained now. Last time I checked a new version
had not been released for a year or so.

> This also means that an alternative javascript-mode might be acceptable.
> But you guys need to agree on which one will be the default mode (I
> suggest to make auto-mode-alist bind *.js files to javascript-mode and
> then make that into an alias that can easily be changed).  Also the
> alternative mode needs to be as lean/simple/clean as possible (e.g. when
> bumping into limitations of the generic Emacs support code, it'd be
> better to live with it until it gets fixed (and/or get the generic code
> fixed) than trying to work around it).

I see no reason to make javascript-mode the default for JavaScript
files. I definitely think espresso-mode would be a better choice, even
though users would have to see "Espresso" in the mode line, which
could possibly confuse some people, but that's the only drawback as
far as I'm concerned. What I would really *not* like to see though is
js2-mode as the default.

-- 
Deniz Dogan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]