summaryrefslogtreecommitdiff
path: root/test/indent/js.js
diff options
context:
space:
mode:
authorJackson Ray Hamilton <jackson@jacksonrayhamilton.com>2015-03-07 18:01:05 -0800
committerJackson Ray Hamilton <jackson@jacksonrayhamilton.com>2015-03-10 10:19:07 -0700
commit933e0ab4b0d583b81b8624def414b7895987927b (patch)
tree881ed232dbd2f0e6443a7036dfcb9fd37bc5aaad /test/indent/js.js
parent33d9869b5f7a5acaca838e2b57e5ae713df9603d (diff)
downloademacs-933e0ab4b0d583b81b8624def414b7895987927b.tar.gz
emacs-933e0ab4b0d583b81b8624def414b7895987927b.tar.bz2
emacs-933e0ab4b0d583b81b8624def414b7895987927b.zip
New indentation option for js-mode
* lisp/progmodes/js.el (js--proper-indentation): Add new custom option `js-indent-first-initialiser' and a function to utilize it, `js--maybe-goto-declaration-keyword-end'. * test/indent/js.js: Add local variables. * test/indent/js-indent-first-initialiser-t.js: New test for `js-indent-first-initialiser'. * test/indent/js-indent-first-initialiser-dynamic.js: New test for `js-indent-first-initialiser'.
Diffstat (limited to 'test/indent/js.js')
-rw-r--r--test/indent/js.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/indent/js.js b/test/indent/js.js
index f41849da284..ad7cb56a277 100644
--- a/test/indent/js.js
+++ b/test/indent/js.js
@@ -1,5 +1,3 @@
-// -*- js-indent-level: 2 -*-
-
var a = 1;
b = 2;
@@ -65,3 +63,8 @@ b +=
baz(`http://foo.bar/${tee}`)
.qux();
+
+// Local Variables:
+// indent-tabs-mode: nil
+// js-indent-level: 2
+// End: