* bug#9151: js-mode indentation doesn't recognize brace-less function expressions
@ 2011-07-22 19:28 Štěpán Němec
2019-08-21 7:54 ` Knut Olav Bøhmer
0 siblings, 1 reply; 2+ messages in thread
From: Štěpán Němec @ 2011-07-22 19:28 UTC (permalink / raw)
To: 9151
GNU Emacs 24.0.50.6 (i686-pc-linux-gnu) of 2011-01-15 on headley
In JavaScript, the following is a valid function definition:
function foo ()
a.somewhat().complicated()
.computation()
but `js-mode' currently indents it like this:
function foo ()
a.somewhat().complicated()
.computation()
--
Štěpán
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#9151: js-mode indentation doesn't recognize brace-less function expressions
2011-07-22 19:28 bug#9151: js-mode indentation doesn't recognize brace-less function expressions Štěpán Němec
@ 2019-08-21 7:54 ` Knut Olav Bøhmer
0 siblings, 0 replies; 2+ messages in thread
From: Knut Olav Bøhmer @ 2019-08-21 7:54 UTC (permalink / raw)
To: 9151
[-- Attachment #1: Type: text/plain, Size: 405 bytes --]
This bug is probably more important to day then 8 years ago because of the
widely used arrow function with concise body syntax as documented here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions#Function_body
Right:
const something = () =>
indent_like_this();
Wrong:
const something = () =>
not_indent_like_this();
--
Knut Olav Bøhmer
[-- Attachment #2: Type: text/html, Size: 704 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-21 7:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-22 19:28 bug#9151: js-mode indentation doesn't recognize brace-less function expressions Štěpán Němec
2019-08-21 7:54 ` Knut Olav Bøhmer
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).