]> git.eshelyaron.com Git - emacs.git/commit
Indent broken arrow function bodies as an N+1th arg
authorJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Sun, 24 Mar 2019 20:17:12 +0000 (13:17 -0700)
committerJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Tue, 9 Apr 2019 05:48:23 +0000 (22:48 -0700)
commit84b1cfbc2d6b9236913a18ed192798fd530911db
tree8d96fb77965f2f0e9025e38adbe597e95a2352ab
parentd9d1bb2b07750f3b2f2a9f8fa3d7aa1a5ec5038e
Indent broken arrow function bodies as an N+1th arg

* lisp/progmodes/js.el (js--line-terminating-arrow-re): Revise regexp
for use with re-search-backward.
(js--looking-at-broken-arrow-function-p): Remove.
(js--broken-arrow-terminates-line-p): Replacement for
js--looking-at-broken-arrow-function-p.  Don’t consider whether an
arrow appears at point (in an arglist); instead, just look for an
arrow that terminates the line.
(js--proper-indentation): Use js--broken-arrow-terminates-line-p.

* test/manual/indent/js.js: Add test for a broken arrow as an N+1th
arg.
lisp/progmodes/js.el
test/manual/indent/js.js