]> git.eshelyaron.com Git - emacs.git/commit
Add new defcustom js-jsx-align->-with-<
authorJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Wed, 10 Apr 2019 02:42:49 +0000 (19:42 -0700)
committerJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Wed, 10 Apr 2019 02:42:49 +0000 (19:42 -0700)
commitf29010729f85434ee24efd0d7ed29b7e24cf8be6
tree8ae675f30a8bcd55f4771802a47975abc18ed1b8
parentc0b09f42f5107dc009629ee73a790ca1d62d290a
Add new defcustom js-jsx-align->-with-<

* lisp/progmodes/js.el (js-jsx-align->-with-<): New variable for users
to control one opinionated aspect of JSX indentation.  It defaults to
the style seen in the React docs, which many users expected as the
“correct” indentation.  Still, the old SGML-style of indentation could
be desirable too, especially since it was the old default.  This
ensures users have a way of getting back the old behavior.
(js-jsx--contextual-indentation): Respect js-jsx-align->-with-<.

* test/manual/indent/jsx-align-gt-with-lt.jsx: New test for
js-jsx-align->-with-<.
lisp/progmodes/js.el
test/manual/indent/jsx-align-gt-with-lt.jsx [new file with mode: 0644]