• Jackson Ray Hamilton's avatar
    Indent broken arrow function bodies as an N+1th arg · 84b1cfbc
    Jackson Ray Hamilton authored
    * 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.
    84b1cfbc
js.js 1.87 KB