X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/1b19cbe7b746467b97927a55078f0a7465991e64..3c69aea0c267e7bbadd5e35eb6cab54764c9d91c:/js2-mode.el diff --git a/js2-mode.el b/js2-mode.el index 365bfa772..9fd8ba4fe 100644 --- a/js2-mode.el +++ b/js2-mode.el @@ -1,12 +1,15 @@ ;;; js2-mode.el --- Improved JavaScript editing mode -;; Copyright (C) 2009, 2012 Free Software Foundation, Inc. +;; Copyright (C) 2009, 2011-2013 Free Software Foundation, Inc. -;; Author: Steve Yegge -;; Contributors: mooz -;; Dmitry Gutov -;; Version: See `js2-mode-version' -;; Keywords: languages, javascript +;; Author: Steve Yegge +;; mooz +;; Dmitry Gutov +;; URL: https://github.com/mooz/js2-mode/ +;; http://code.google.com/p/js2-mode/ +;; Version: 20130510 +;; Keywords: languages, javascript +;; Package-Requires: ((emacs "24.1")) ;; This file is part of GNU Emacs. @@ -28,7 +31,7 @@ ;; This JavaScript editing mode supports: ;; - strict recognition of the Ecma-262 language standard -;; - support for most Rhino and SpiderMonkey extensions from 1.5 to 1.8 +;; - support for most Rhino and SpiderMonkey extensions from 1.5 and up ;; - parsing support for ECMAScript for XML (E4X, ECMA-357) ;; - accurate syntax highlighting using a recursive-descent parser ;; - on-the-fly reporting of syntax errors and strict-mode warnings @@ -40,20 +43,23 @@ ;; - show some or all block comments as /*...*/ ;; - context-sensitive menu bar and popup menus ;; - code browsing using the `imenu' package -;; - typing helpers such as automatic insertion of matching braces/parens ;; - many customization options ;; Installation: ;; ;; To install it as your major mode for JavaScript editing: -;; (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode)) +;; (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode)) ;; Alternately, to install it as a minor mode just for JavaScript linting, ;; you must add it to the appropriate major-mode hook. Normally this would be: ;; (add-hook 'js-mode-hook 'js2-minor-mode) +;; You may also want to hook it in for shell scripts running via node.js: + +;; (add-to-list 'interpreter-mode-alist '("node" . js2-mode)) + ;; To customize how it works: ;; M-x customize-group RET js2-mode RET @@ -73,6 +79,10 @@ ;; This means that `js2-mode' is currently only useful for editing JavaScript ;; files, and not for editing JavaScript within