From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: javascript-generic-mode vs js-mode Date: Mon, 8 Oct 2012 17:20:35 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1349709691 19378 80.91.229.3 (8 Oct 2012 15:21:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Oct 2012 15:21:31 +0000 (UTC) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 08 17:21:38 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TLF9C-0005nN-8m for ged-emacs-devel@m.gmane.org; Mon, 08 Oct 2012 17:21:34 +0200 Original-Received: from localhost ([::1]:46148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLF96-0002tr-6y for ged-emacs-devel@m.gmane.org; Mon, 08 Oct 2012 11:21:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLF8z-0002tL-20 for emacs-devel@gnu.org; Mon, 08 Oct 2012 11:21:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLF8u-0005O4-SH for emacs-devel@gnu.org; Mon, 08 Oct 2012 11:21:20 -0400 Original-Received: from mail-wg0-f49.google.com ([74.125.82.49]:60153) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLF8u-0005Mu-K7 for emacs-devel@gnu.org; Mon, 08 Oct 2012 11:21:16 -0400 Original-Received: by mail-wg0-f49.google.com with SMTP id gg4so2793888wgb.30 for ; Mon, 08 Oct 2012 08:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=zRqgZPUcoutz3jCHC4K4Ub7/7XTuVrDj7j9N3UhoJT4=; b=a6UQLXfIRGD7DUsLyVOkA/SBt54R8q/7f3INkDNDfLD8zChzXhKpb6vm+TuiHNHwRt OzO/fGdI1LHirg2E4xZ3xYexXOeyCOlpEmyp2CoD9II658CHPjcpcWDIXemqSQ106atw ED/kmkL87kHCHrxhHiKwRh6OHayIXkDLddiKxddThyV2ky4ojKfK6y0Y6TAJMQ4nFhgc N4dNuskHLv6r9Uxx6zaiqJchTEC7QxQ27JNyvpgWUy92VVC9KZsBeZeqdUSsAlCTuPMx O13VlR82QH57a1GCsAAM7BacSsCDnwANssFpPeRo9zgJLiTDJR1TE2+AaZ5vFzJRGlws fgRw== Original-Received: by 10.180.79.2 with SMTP id f2mr22138798wix.2.1349709675258; Mon, 08 Oct 2012 08:21:15 -0700 (PDT) Original-Received: by 10.223.155.132 with HTTP; Mon, 8 Oct 2012 08:20:35 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.49 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154240 Archived-At: 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)