unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Phil Hagelberg <phil@evri.com>
To: emacs-devel@gnu.org
Subject: Re: javascript.el (was: json.el - JavaScript Object Notation parser / generator for Emacs Lisp)
Date: Fri, 22 Feb 2008 16:28:22 -0800	[thread overview]
Message-ID: <85ve4gcy8p.fsf@evri.com> (raw)
In-Reply-To: <85zltsd1st.fsf_-_@evri.com> (Phil Hagelberg's message of "Fri, 22 Feb 2008 15:11:30 -0800")

Phil Hagelberg <phil@evri.com> writes:

> Richard Stallman <rms@gnu.org> 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




  parent reply	other threads:[~2008-02-23  0:28 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m21wwvfhbr.fsf@roisin.local>
     [not found] ` <E1FM3dc-0006c2-BV@fencepost.gnu.org>
     [not found]   ` <3b31caf90603220930k1f133151m81ab6986e9aff946@mail.gmail.com>
     [not found]     ` <E1FMVmY-0006om-Oi@fencepost.gnu.org>
2008-02-11 19:46       ` json.el - JavaScript Object Notation parser / generator for Emacs Lisp Edward O'Connor
2008-02-12 14:22         ` Leo
2008-02-12 20:59           ` Edward O'Connor
2008-02-12 18:39         ` Phil Hagelberg
2008-02-13  0:25         ` Richard Stallman
2008-02-14 14:15         ` T. V. Raman
2008-02-19 23:49         ` Edward O'Connor
2008-02-21 19:43           ` Michael Olson
2008-02-21 22:28             ` Miles Bader
2008-02-21 23:46               ` Michael Olson
2008-02-22  0:20                 ` Phil Hagelberg
2008-02-22  1:08                   ` Miles Bader
2008-02-22 22:56                   ` Richard Stallman
2008-02-22 23:11                     ` javascript.el (was: json.el - JavaScript Object Notation parser / generator for Emacs Lisp) Phil Hagelberg
2008-02-22 23:18                       ` javascript.el Lennart Borgman (gmail)
2008-02-23  0:35                         ` javascript.el Phil Hagelberg
2008-02-23  0:44                           ` javascript.el Lennart Borgman (gmail)
2008-02-23  0:28                       ` Phil Hagelberg [this message]
2008-02-23 19:29                         ` javascript.el (was: json.el - JavaScript Object Notation parser / generator for Emacs Lisp) Richard Stallman
2008-02-26 19:56                           ` Phil Hagelberg
2008-02-27 16:07                             ` Richard Stallman
2008-02-22  0:30                 ` json.el - JavaScript Object Notation parser / generator for Emacs Lisp Miles Bader
2008-02-22  1:25                   ` Michael Olson
2008-02-26  6:58                     ` Edward O'Connor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85ve4gcy8p.fsf@evri.com \
    --to=phil@evri.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).