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?

  • 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
    Commented Oct 26, 2017 at 15:38

1 Answer 1


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.

  • 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
    Commented Oct 26, 2017 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
    Commented Oct 26, 2017 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.