* javascript-generic-mode vs js-mode
@ 2012-10-08 15:20 Juanma Barranquero
2012-10-08 15:47 ` Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Juanma Barranquero @ 2012-10-08 15:20 UTC (permalink / raw)
To: Emacs developers
Emacs has a proper JavaScript mode (js.el) since 2009.
Does it make sense to keep javascript-generic-mode from generic-x.el?
It's a poor man's js-mode and it hides js-mode in auto-mode-alist if
you require generic-x.el and forget or ignore js.el.
I'd suggest just removing it and obsolete-aliasing it to js-mode.
Juanma
@@ -646,83 +646,10 @@
"Generic mode for Sys V pkginfo files."))
;; Javascript mode
-;; Includes extra keywords from Armando Singer [asinger@MAIL.COLGATE.EDU]
+;; Obsolete; defer to js-mode from js.el.
(when (memq 'javascript-generic-mode generic-extras-enable-list)
-
-(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"))
;; VRML files
(when (memq 'vrml-generic-mode generic-extras-enable-list)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: javascript-generic-mode vs js-mode
2012-10-08 15:20 javascript-generic-mode vs js-mode Juanma Barranquero
@ 2012-10-08 15:47 ` Stefan Monnier
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2012-10-08 15:47 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: Emacs developers
> I'd suggest just removing it and obsolete-aliasing it to js-mode.
Please remove it,
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-08 15:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-08 15:20 javascript-generic-mode vs js-mode Juanma Barranquero
2012-10-08 15:47 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.