aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJackson Ray Hamilton2019-04-09 18:50:28 -0700
committerJackson Ray Hamilton2019-04-09 18:50:28 -0700
commitc0b09f42f5107dc009629ee73a790ca1d62d290a (patch)
tree78375bd765654e783df38e09fe0c27485817211c
parent5772971f255c7031753e02492ae979c501018a50 (diff)
downloademacs-c0b09f42f5107dc009629ee73a790ca1d62d290a.tar.gz
emacs-c0b09f42f5107dc009629ee73a790ca1d62d290a.zip
* etc/NEWS: Document way to revert to old JSX indentation behavior
-rw-r--r--etc/NEWS19
1 files changed, 13 insertions, 6 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 620d88c32a2..81b7d26dc3a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1294,12 +1294,19 @@ conventions.
1294 1294
1295--- 1295---
1296*** Indentation uses 'js-indent-level' instead of 'sgml-basic-offset'. 1296*** Indentation uses 'js-indent-level' instead of 'sgml-basic-offset'.
1297It was never really intuitive that JSX indentation would be controlled 1297Since JSX is a syntax extension of JavaScript, it makes the most sense
1298by an SGML variable. JSX is a syntax extension of JavaScript, so it 1298for JSX expressions to be indented the same number of spaces as other
1299should be indented just like any other expression in JavaScript. This 1299JS expressions. This is a breaking change, but it probably aligns
1300is technically a breaking change, but it will probably align with how 1300with how you'd expect this indentation to behave. If you want JSX to
1301you would normally expect for this indentation to be controlled, and 1301be indented like JS, you won't need to change your config.
1302you probably won't need to change your config. 1302
1303The old behavior can be emulated by controlling JSX indentation
1304independently of JS, by setting 'js-jsx-indent-level'.
1305
1306---
1307*** New defcustom 'js-jsx-indent-level' for different JSX indentation.
1308If you wish to indent JSX by a different number of spaces than JS, set
1309this variable to the desired number.
1303 1310
1304--- 1311---
1305*** New defcustom 'js-jsx-attribute-offset' for JSX attribute indents. 1312*** New defcustom 'js-jsx-attribute-offset' for JSX attribute indents.