From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jackson Hamilton Newsgroups: gmane.emacs.bugs Subject: bug#21799: Requesting review for change to js.el Date: Sat, 31 Oct 2015 09:53:05 -0700 Message-ID: References: <5634B5B4.6070907@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c2ebeebcc9540523696094 X-Trace: ger.gmane.org 1446310459 17772 80.91.229.3 (31 Oct 2015 16:54:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Oct 2015 16:54:19 +0000 (UTC) Cc: 21799@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 31 17:54:10 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ZsZPu-0006xp-40 for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Oct 2015 17:54:10 +0100 Original-Received: from localhost ([::1]:56409 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsZPt-0007bJ-CU for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Oct 2015 12:54:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsZPp-0007aY-F3 for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 12:54:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsZPm-0001SS-97 for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 12:54:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsZPm-0001S8-5d for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 12:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZsZPl-0001DC-R8 for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 12:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jackson Hamilton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Oct 2015 16:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21799 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21799-submit@debbugs.gnu.org id=B21799.14463104074610 (code B ref 21799); Sat, 31 Oct 2015 16:54:01 +0000 Original-Received: (at 21799) by debbugs.gnu.org; 31 Oct 2015 16:53:27 +0000 Original-Received: from localhost ([127.0.0.1]:47271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsZPC-0001CH-HI for submit@debbugs.gnu.org; Sat, 31 Oct 2015 12:53:26 -0400 Original-Received: from mail-ob0-f172.google.com ([209.85.214.172]:36541) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsZOr-0001Bm-TI for 21799@debbugs.gnu.org; Sat, 31 Oct 2015 12:53:24 -0400 Original-Received: by obdgf3 with SMTP id gf3so2902017obd.3 for <21799@debbugs.gnu.org>; Sat, 31 Oct 2015 09:53:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=1u8qyq08MYWXzu/uXI7PyA7sqpFweu7j/YQLVKuO3mE=; b=oX5/YOqGNpGKYohk5nr1RbMtdr9obWrqiTOn+VbnaHyxjv/MYjGkXivxFc8ZNyJTZx FTdKoRHcPA0l2Zf+AOEJrktC3kcKjcoyoRg0JyCz+fa9eh9GpZjbDP2ZyrhyvZKtWiWw o0OZkNDoykPAMLUhxJ1MG4iNiYrj4GQoNVVwfeB51NXMS4sNFMPvwSgCp3ag2qLFQA/0 OaEN3WfRmbYVT7PTqMgBz+DznaG4QBqXUIyF9NaQ0BUSddtmy6GoIZvps+7lMcZCECev F2n4VacujTa74sOGbK6LxlraVI3RstwtSm3S5HIIUYPoVrzf58ndKw9NPR4a5/C+wsVb B40w== X-Received: by 10.182.29.72 with SMTP id i8mr9274027obh.67.1446310385074; Sat, 31 Oct 2015 09:53:05 -0700 (PDT) Original-Received: by 10.76.55.10 with HTTP; Sat, 31 Oct 2015 09:53:05 -0700 (PDT) In-Reply-To: <5634B5B4.6070907@yandex.ru> X-Google-Sender-Auth: 5HknCmqdS_i3lUlEDKaWa4Jgsz0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108237 Archived-At: --001a11c2ebeebcc9540523696094 Content-Type: text/plain; charset=UTF-8 Some use the ".jsx" extension, some just use ".js". One could also do (add-to-list 'auto-mode-alist '("\\.js\\'" . js-jsx-mode)). I like the idea of separating the modes as js-jsx-mode and js2-jsx-mode, I'll make that change. On Sat, Oct 31, 2015 at 5:36 AM, Dmitry Gutov wrote: > On 10/31/2015 11:37 AM, Jackson Hamilton wrote: > >> See attached patch. Adds JSX indentation support to js-mode. >> > > Hi Jackson, > > JSX files have a different extension, right? Why don't we make it a > separate major mode? > > It can also live in js.el and derive from js-mode. The only thing it'll > change (for now?) is the indentation function. > > And for those who also want the js2-mode AST, we can either tell them to > use js2-minor-mode, or also create a js2-jsx-mode that would derive from > js2-mode and use the indentation function defined here. > > Then there will be no need for the option js-indent-jsx. > --001a11c2ebeebcc9540523696094 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Some use the ".jsx" extension, some just use &qu= ot;.js". One could also do (add-to-list 'auto-mode-alist '(&qu= ot;\\.js\\'" . js-jsx-mode)).

I like the idea o= f separating the modes as js-jsx-mode and js2-jsx-mode, I'll make that = change.

= On Sat, Oct 31, 2015 at 5:36 AM, Dmitry Gutov <dgutov@yandex.ru> wrote:
On 10/31/2015 11:37 AM, Jackson Hamilton wro= te:
See attached patch. Adds JSX indentation support to js-mode.

Hi Jackson,

JSX files have a different extension, right? Why don't we make it a sep= arate major mode?

It can also live in js.el and derive from js-mode. The only thing it'll= change (for now?) is the indentation function.

And for those who also want the js2-mode AST, we can either tell them to us= e js2-minor-mode, or also create a js2-jsx-mode that would derive from js2-= mode and use the indentation function defined here.

Then there will be no need for the option js-indent-jsx.

--001a11c2ebeebcc9540523696094--