-
-(define-generic-mode javascript-generic-mode
- '("//" ("/*" . "*/"))
- '("break"
- "case"
- "continue"
- "default"
- "delete"
- "do"
- "else"
- "export"
- "for"
- "function"
- "if"
- "import"
- "in"
- "new"
- "return"
- "switch"
- "this"
- "typeof"
- "var"
- "void"
- "while"
- "with"
- ;; words reserved for ECMA extensions below
- "catch"
- "class"
- "const"
- "debugger"
- "enum"
- "extends"
- "finally"
- "super"
- "throw"
- "try"
- ;; Java Keywords reserved by JavaScript
- "abstract"
- "boolean"
- "byte"
- "char"
- "double"
- "false"
- "final"
- "float"
- "goto"
- "implements"
- "instanceof"
- "int"
- "interface"
- "long"
- "native"
- "null"
- "package"
- "private"
- "protected"
- "public"
- "short"
- "static"
- "synchronized"
- "throws"
- "transient"
- "true")
- '(("^\\s-*function\\s-+\\([A-Za-z0-9_]+\\)"
- (1 font-lock-function-name-face))
- ("^\\s-*var\\s-+\\([A-Za-z0-9_]+\\)"
- (1 font-lock-variable-name-face)))
- '("\\.js\\'")
- (list
- (function
- (lambda ()
- (setq imenu-generic-expression
- '((nil "^function\\s-+\\([A-Za-z0-9_]+\\)" 1)
- ("*Variables*" "^var\\s-+\\([A-Za-z0-9_]+\\)" 1))))))
- "Generic mode for JavaScript files."))
+ (define-obsolete-function-alias 'javascript-generic-mode 'js-mode "24.3")
+ (define-obsolete-variable-alias 'javascript-generic-mode-hook 'js-mode-hook "24.3"))