4

I saw there is a js-mode bundled in Emacs. I've also seen a js2-mode. However, I have also seen Emacs git log on js-mode refers to js2-mode bug reports. What is the relationship between them?

xuhdev
  • 1,839
  • 13
  • 26
  • The js2-mode maintainer happens to have commit access to Emacs and therefore fixed an issue present in both of them. To not repeat themselves, a link explaining the problem was added. This isn't about their relationship, but rather the convenient thing to do here. – wasamasa Oct 26 '17 at 15:38

1 Answers1

3

In addition to what @wasamasa said, js2-mode derives from js-mode and shares its indentation engine.

Thus, fixing an indentation bug in js-mode fixes it in js2-mode as well.

Dmitry
  • 3,508
  • 15
  • 20
  • Ah, so there is indeed a relationship between them, thanks for the info! For some reason I assumed indentation in js2-mode was a homebrew solution when reading about it on Steve Yegge's blog. – wasamasa Oct 26 '17 at 21:06
  • @wasamasa Even back then, it had a lot of common with indentation code in js-mode. Either by copying from it, or by copying from a common source. – Dmitry Oct 26 '17 at 21:41