bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21799: Requesting review for change to js.el


From: Jackson Hamilton
Subject: bug#21799: Requesting review for change to js.el
Date: Sat, 31 Oct 2015 09:53:05 -0700

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 <dgutov@yandex.ru> 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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]