[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: javascript.el (was: json.el - JavaScript Object Notation parser / ge
From: |
Phil Hagelberg |
Subject: |
Re: javascript.el (was: json.el - JavaScript Object Notation parser / generator for Emacs Lisp) |
Date: |
Fri, 22 Feb 2008 16:28:22 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
Phil Hagelberg <address@hidden> writes:
> Richard Stallman <address@hidden> writes:
>
>> Now that I think about it, it's somewhat ironic that JSON is
>> supported but there's no mode for Javascript in Emacs. Have any of the
>> many Javascript major modes[1] been considered for inclusion?
>>
>> It would be nice to install a good one. The way to do this is for
>> someone to study them, rate them, then see which ones' authors will
>> sign the legal papers.
>
> I'll give that a shot and report back with my findings.
OK, so I've looked over a total of four modes:
* javascript-mode.el
* js-mode.el
* ecmascript-mode.el
* javascript.el
All of them are based on cc-mode and licensed under the GPL v2 or
later. The biggest difference seems to be in what they add to
cc-mode.
== javascript-mode.el
http://www.brigadoon.de/peter/javascript-mode.el
By Steven Champeon and Ville Skyttä
Last modified in May of 2006
This one is based on c++-mode. It knows about many JS reserved words
and what constitutes valid identifiers/functions and is included in
XEmacs. The URL given above seems to be the original source, but it's
not responding, so you can get it instead from
http://cvs.xemacs.org/viewcvs.cgi/XEmacs/packages/xemacs-packages/prog-modes/javascript-mode.el
== js-mode.el
http://repo.hyperstruct.net/mozrepl/chrome/content/js-mode.el
By Massimilano Mirra
Last modified in 2006
This one is based on java-mode. It to be an even thinner layer on
cc-mode than the above and treats Javascript code a lot like Java.
The author recommends you use Landstrom's javascript.el, so this one
can safely be considered deprecated.
== emcascript-mode.el
http://www.emacswiki.org/cgi-bin/wiki/download/ecmascript-mode.el
By David Lindquist
Last modified in 2005
This one is also based on java-mode. It knows a good deal about JS
reserved words and removes things that are in Java but not
Javascript. It claims to also be suitable for ActionScript, but that
is probably true of all of these since the two languages are extremely
similar.
== javascript.el
http://www.brgeight.se/downloads/emacs/javascript.el
By Karl Landstrom
Last modified in 2006
This one is based directly on cc-mode with heavily modifications. It
has a fairly comprehensive knowledge of Javascript reserved words,
identifiers, and functions. Based on my own observations, this seems
to be the favourite of Javascript hackers.
I suspect the best thing to do would be to install one of the last two
modes listed if we can get copyright assigned. I am leaning towards
javascript.el personally since it seems to be more comprehensive, but
I'm not very familiar with cc-mode. If someone who's more
knowledgeable could look review it to make sure it's reasonably
maintainable, I will contact the author to see if he's interested in
copyright assignment.
-Phil Hagelberg
http://technomancy.us
- Re: json.el - JavaScript Object Notation parser / generator for Emacs Lisp, (continued)
- Re: json.el - JavaScript Object Notation parser / generator for Emacs Lisp, Phil Hagelberg, 2008/02/21
- Re: json.el - JavaScript Object Notation parser / generator for Emacs Lisp, Miles Bader, 2008/02/21
- Re: json.el - JavaScript Object Notation parser / generator for Emacs Lisp, Richard Stallman, 2008/02/22
- javascript.el (was: json.el - JavaScript Object Notation parser / generator for Emacs Lisp), Phil Hagelberg, 2008/02/22
- Re: javascript.el, Lennart Borgman (gmail), 2008/02/22
- Re: javascript.el, Phil Hagelberg, 2008/02/22
- Re: javascript.el, Lennart Borgman (gmail), 2008/02/22
- Re: javascript.el (was: json.el - JavaScript Object Notation parser / generator for Emacs Lisp),
Phil Hagelberg <=
- Re: javascript.el (was: json.el - JavaScript Object Notation parser / generator for Emacs Lisp), Richard Stallman, 2008/02/23
- Re: javascript.el (was: json.el - JavaScript Object Notation parser / generator for Emacs Lisp), Phil Hagelberg, 2008/02/26
- Re: javascript.el (was: json.el - JavaScript Object Notation parser / generator for Emacs Lisp), Richard Stallman, 2008/02/27