File: js.el.html
This is based on Karl Landstrom's barebones javascript-mode. This
is much more robust and works with cc-mode's comment filling
(mostly).
The main features of this JavaScript mode are syntactic
highlighting (enabled with font-lock-mode(var)/font-lock-mode(fun) or
global-font-lock-mode(var)/global-font-lock-mode(fun)), automatic indentation and filling of
comments, C preprocessor fontification, and MozRepl integration.
General Remarks:
XXX: This mode assumes that block comments are not nested inside block XXX: comments
Exported names start with "js-"; private names start with
"js--".
Defined variables (80)
js--available-frameworks | List of available JavaScript frameworks symbols. |
js--basic-type-re | Regular expression matching any predefined type in JavaScript. |
js--cache-end | Last valid buffer position for the ‘js-mode’ function cache. |
js--class-styles | List of JavaScript class definition styles. |
js--constant-re | Regular expression matching any future reserved words in JavaScript. |
js--cpp-name-re | Regexp matching a C preprocessor name. |
js--declaration-keyword-re | Regular expression matching variable declaration keywords. |
js--dotted-name-re | Regexp matching a dot-separated sequence of JavaScript names. |
js--extjs-class-decl-re-1 | Regexp matching an ExtJS class declaration (style 1). |
js--extjs-class-decl-re-2 | Regexp matching an ExtJS class declaration (style 2). |
js--font-lock-keywords | Font lock keywords for ‘js-mode’. See ‘font-lock-keywords’. |
js--font-lock-keywords-1 | Level one font lock keywords for ‘js-mode’. |
js--font-lock-keywords-2 | Level two font lock keywords for ‘js-mode’. |
js--font-lock-keywords-3 | Level three font lock for ‘js-mode’. |
js--function-heading-1-re | Regexp matching the start of a JavaScript function header. |
js--function-heading-2-re | Regexp matching the start of a function entry in an associative array. |
js--function-heading-3-re | Regexp matching a line in the JavaScript form "var MUMBLE = function". |
js--indent-operator-re | Regexp matching operators that affect indentation of continued expressions. |
js--js-array-as-list | Whether to listify any Array returned by a Mozilla function. |
js--js-context | The current JavaScript context. |
js--js-gc-idle-timer | Idle timer for cleaning up JS object references. |
js--js-process | The most recent MozRepl process object. |
js--js-references | Maps Elisp JavaScript proxy objects to their JavaScript IDs. |
js--keyword-re | Regexp matching any JavaScript keyword. |
js--last-parse-pos | Latest parse position reached by ‘js--ensure-cache’. |
js--line-terminating-arrow-re | Regexp matching the last "=>" (arrow) token on a line. |
js--macro-decl-re | Regexp matching a CPP macro definition, up to the opening parenthesis. |
js--mochikit-class-re | Regexp matching a MochiKit class declaration. |
js--moz-interactor | String to set MozRepl up into a simple-minded evaluation mode. |
js--name-re | Regexp matching a JavaScript identifier, without grouping. |
js--name-start-re | Regexp matching the start of a JavaScript identifier, without grouping. |
js--objfield-re | Regexp matching the start of a JavaScript object field. |
js--opt-cpp-start | Regexp matching the prefix of a cpp directive. |
js--plain-class-re | Regexp matching a JavaScript explicit prototype "class" declaration. |
js--plain-method-re | Regexp matching an explicit JavaScript prototype "method" declaration. |
js--possibly-braceless-keyword-re | Regexp matching keywords optionally followed by an opening brace. |
js--prettify-symbols-alist | Alist of symbol prettifications for JavaScript. |
js--quick-match-re | Autogenerated regexp used by ‘js-mode’ to match buffer constructs. |
js--quick-match-re-func | Autogenerated regexp used by ‘js-mode’ to match constructs and functions. |
js--state-at-last-parse-pos | Parse state at ‘js--last-parse-pos’. |
js--symbol-history | History of entered JavaScript symbols. |
js--syntax-propertize-regexp-regexp | Regular expression matching a JavaScript regexp literal. |
js--unary-keyword-re | Regexp matching unary operator keywords. |
js-chain-indent | Use "chained" indentation. |
js-comment-lineup-func | Lineup function for ‘cc-mode-style’, for C comments in ‘js-mode’. |
js-curly-indent-offset | Number of additional spaces for indenting expressions in curly braces. |
js-enabled-frameworks | Frameworks recognized by ‘js-mode’. |
js-expr-indent-offset | Number of additional spaces for indenting continued expressions. |
js-flat-functions | Treat nested functions as top-level functions in ‘js-mode’. |
js-indent-align-list-continuation | Align continuation of non-empty ([{ lines in ‘js-mode’. |
js-indent-first-init | Non-nil means specially indent the first variable declaration’s initializer. |
js-indent-level | Number of spaces for each indentation step in ‘js-mode’. |
js-js-switch-tabs | Whether ‘js-mode’ should display tabs while selecting them. |
js-js-timeout | Reply timeout for executing commands in Mozilla via ‘js-mode’. |
js-js-tmpdir | Temporary directory used by ‘js-mode’ to communicate with Mozilla. |
js-jsx--attribute-name-re | Like ‘js--name-re’, but matches “-” as well. |
js-jsx--font-lock-keywords | JSX font lock faces and multiline text properties. |
js-jsx--indent-attribute-line | Line relative to which indentation uses JSX as a baseline. |
js-jsx--indent-col | Baseline column for JS indentation within JSX. |
js-jsx--self-closing-re | Regexp matching the end of a self-closing JSXOpeningElement. |
js-jsx--tag-start-re | Regexp unambiguously matching a JSXOpeningElement. |
js-jsx--text-properties | Plist of text properties added by ‘js-syntax-propertize’. |
js-jsx-align->-with-< | When non-nil, “>” will be indented to the opening “<” in JSX. |
js-jsx-attribute-offset | Specifies a delta for JSXAttribute indentation. |
js-jsx-detect-syntax | When non-nil, automatically detect whether JavaScript uses JSX. |
js-jsx-indent-level | When non-nil, indent JSX by this value, instead of like JS. |
js-jsx-mode-abbrev-table | Abbrev table for ‘js-jsx-mode’. |
js-jsx-mode-hook | Hook run after entering JavaScript mode. |
js-jsx-mode-map | Keymap for ‘js-jsx-mode’. |
js-jsx-mode-syntax-table | Syntax table for ‘js-jsx-mode’. |
js-jsx-regexps | Case-sensitive regexps for detecting JSX in JavaScript buffers. |
js-jsx-syntax | When non-nil, parse JavaScript with consideration for JSX syntax. |
js-mode-abbrev-table | Abbrev table for ‘js-mode’. |
js-mode-hook | Hook run after entering JavaScript mode. |
js-mode-map | Keymap for ‘js-mode’. |
js-mode-syntax-table | Syntax table for ‘js-mode’. |
js-paren-indent-offset | Number of additional spaces for indenting expressions in parentheses. |
js-square-indent-offset | Number of additional spaces for indenting expressions in square braces. |
js-switch-indent-offset | Number of additional spaces for indenting the contents of a switch block. |
js-syntactic-mode-name | If non-nil, print enabled syntaxes in the mode name. |