GNU bug report logs - #26001
js-mode: JSX indentation after fat-arrow attribute

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Dražen <kermit666@HIDDEN>; merged with #24896, #30225, #32158; dated Mon, 6 Mar 2017 16:19:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 24896 26001 30225 32158. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 24896 26001 30225. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Forcibly Merged 24896 26001. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Mar 2017 16:19:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 06 11:19:01 2017
Received: from localhost ([127.0.0.1]:42972 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ckvLg-0007fO-Ln
	for submit <at> debbugs.gnu.org; Mon, 06 Mar 2017 11:19:01 -0500
Received: from eggs.gnu.org ([208.118.235.92]:57521)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kermit666@HIDDEN>) id 1cktpB-00052c-12
 for submit <at> debbugs.gnu.org; Mon, 06 Mar 2017 09:41:21 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <kermit666@HIDDEN>) id 1cktp4-00054f-7c
 for submit <at> debbugs.gnu.org; Mon, 06 Mar 2017 09:41:15 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: *
X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50,
 FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:58268)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <kermit666@HIDDEN>) id 1cktp4-00054G-2C
 for submit <at> debbugs.gnu.org; Mon, 06 Mar 2017 09:41:14 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48460)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <kermit666@HIDDEN>) id 1cktp2-0004Nj-EF
 for bug-gnu-emacs@HIDDEN; Mon, 06 Mar 2017 09:41:13 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <kermit666@HIDDEN>) id 1cktp0-00051Z-RA
 for bug-gnu-emacs@HIDDEN; Mon, 06 Mar 2017 09:41:12 -0500
Received: from mail-io0-x22f.google.com ([2607:f8b0:4001:c06::22f]:33144)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <kermit666@HIDDEN>) id 1cktp0-00050P-KC
 for bug-gnu-emacs@HIDDEN; Mon, 06 Mar 2017 09:41:10 -0500
Received: by mail-io0-x22f.google.com with SMTP id f84so113105300ioj.0
 for <bug-gnu-emacs@HIDDEN>; Mon, 06 Mar 2017 06:41:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=eiLNHs08Ot7jw9IrI90LyzDEEHjOznOK46xHWZ/7Lq4=;
 b=UEsmT0v8puaYgbAJKq+G89ji3D1gsEDya7m+V1iMrRhrhU4whOny4/abEYR24Vgmkq
 /EWviS0IypT5UXyKkKek82iU3NxF4J8qKMEJoRk8wiHbeUeP6LjMB6VMtRY6PFN2fAMZ
 63HYfhx4Jq+dk7ArFobu0WDvYXz5XVQYKyXHizT6PexFenWd98ebIgmiSEc4eGa2SkrP
 MI+1dSde9LS36F0CdLl2yn8rUj7IqysR5sIO46oqpmFtVZvLwzCZK2zep+oSaJavB9kf
 LwWkyYE2Buz81l3RD6fzIjoPcrpzJ56OlcxnxW+SfsgBxA5jLs92VQHzQpqKdsdsvQjG
 fULA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=eiLNHs08Ot7jw9IrI90LyzDEEHjOznOK46xHWZ/7Lq4=;
 b=tuiNoJa8Zb7dLAGdNtCwTWseo1LRx54opDyJYxY4XKWqdQzdKbsK5vsEV9uqtrbfPZ
 /CkapGcf5dYOJAfJ0iUpzrlRmMPtgyn+OTNaLNJLAN/V3FzrLwzDfIBd+oIYnej0L5G8
 iOfN0H7rgGU3xobMQzB0HmdGcMELI5CP7QhQHhyW9mLhrYAKjqMNeWIEyiq5k5PhzcGB
 oIcWdkc0PPaCNqSYO83z4KtqjhHfL/g/aKn2Y1VGOmTj3oMWk08eip4hfR7MAGaoftvL
 msPEmEcKYisiEctzr3yTxLucOnAY0Hh197ZpsfeibRKdkLjFu01q+X5+e43yJeh5Vr0J
 uJXg==
X-Gm-Message-State: AMke39mnoWDKTIiYawdh1Ww7jOdJ2Q8eDDsXKtHZxKa5NfNXS2QQ5sQkANkE9m5ntKsm/HVMEaHcdcR7RmH++A==
X-Received: by 10.107.187.133 with SMTP id l127mr14377788iof.1.1488811267899; 
 Mon, 06 Mar 2017 06:41:07 -0800 (PST)
MIME-Version: 1.0
From: =?UTF-8?Q?Dra=C5=BEen?= <kermit666@HIDDEN>
Date: Mon, 06 Mar 2017 14:40:56 +0000
Message-ID: <CADg_27_MhD6X4LcocLZQiDefdGBTFemq-5Ku7DGfPJt9MiumNQ@HIDDEN>
Subject: js-mode: JSX indentation after fat-arrow attribute
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/alternative; boundary=94eb2c0763c8c2c958054a10e2be
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.8 (---)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Mon, 06 Mar 2017 11:18:59 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.8 (---)

--94eb2c0763c8c2c958054a10e2be
Content-Type: text/plain; charset=UTF-8

As mentioned in
https://github.com/mooz/js2-mode/issues/389#issuecomment-271869380 , there
seems to be a bug in the way js-mode (at least the folks there pointed me
at js-mode) indents JSX JavaScript.

When I'm doing a map with JSX syntax I'm getting:

render() {
    const messages = this.state.messages.map(
        message => <Message key={message.id}
        text={message.text}
        mine={message.mine} />
    );    return messages;
}

I'd ideally expect something like:

render() {
    const messages = this.state.messages.map(
        message => <Message key={message.id}
                            text={message.text}
                            mine={message.mine} />
    );    return messages;
}

It's even odder when I try to leave the argument to the arrow function in
the line above:

render() {
    const messages = this.state.messages.map(message =>
                                             <Message key={message.timestamp}
                                             text={message.text}
                                             mine={message.mine} />
                                            );    return messages;
}

For this second case, I'd hope to get:

render() {
    const messages = this.state.messages.map(message =>
        <Message key={message.timestamp}
                 text={message.text}
                 mine={message.mine} />
    );    return messages;
}

(I get such results if I wrap the return expression in parentheses)

--94eb2c0763c8c2c958054a10e2be
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><p style=3D"box-sizing:border-box;margin-bottom:16px;margi=
n-top:0px">As mentioned in=C2=A0<a href=3D"https://github.com/mooz/js2-mode=
/issues/389#issuecomment-271869380">https://github.com/mooz/js2-mode/issues=
/389#issuecomment-271869380</a>=C2=A0, there seems to be a bug in the way j=
s-mode (at least the folks there pointed me at js-mode) indents JSX JavaScr=
ipt.</p><p style=3D"box-sizing:border-box;margin-bottom:16px;margin-top:0px=
"><span style=3D"color:rgb(36,41,46);font-size:14px;font-family:-apple-syst=
em,system-ui,&quot;segoe ui&quot;,helvetica,arial,sans-serif,&quot;apple co=
lor emoji&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;">Whe=
n I&#39;m doing a<span class=3D"inbox-inbox-Apple-converted-space">=C2=A0</=
span><code style=3D"box-sizing:border-box;font-family:sfmono-regular,consol=
as,&quot;liberation mono&quot;,menlo,courier,monospace;font-size:11.9px;pad=
ding:0.2em 0px;margin:0px;background-color:rgba(27,31,35,0.0470588);border-=
radius:3px">map</code><span class=3D"inbox-inbox-Apple-converted-space">=C2=
=A0</span>with JSX syntax I&#39;m getting:</span></p><div class=3D"inbox-in=
box-highlight inbox-inbox-highlight-source-js-jsx" style=3D"box-sizing:bord=
er-box;margin-bottom:16px;color:rgb(36,41,46);font-family:-apple-system,sys=
tem-ui,&quot;segoe ui&quot;,helvetica,arial,sans-serif,&quot;apple color em=
oji&quot;,&quot;segoe ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:=
14px;overflow:visible"><pre style=3D"box-sizing:border-box;font-family:sfmo=
no-regular,consolas,&quot;liberation mono&quot;,menlo,courier,monospace;fon=
t-size:11.9px;margin-top:0px;margin-bottom:0px;font-stretch:normal;line-hei=
ght:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(2=
46,248,250);border-radius:3px;word-break:normal"><span class=3D"inbox-inbox=
-pl-en" style=3D"box-sizing:border-box;color:rgb(121,93,163)">render</span>=
() {
    <span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:r=
gb(167,29,93)">const</span> <span class=3D"inbox-inbox-pl-smi" style=3D"box=
-sizing:border-box;color:rgb(51,51,51)">messages</span><span class=3D"inbox=
-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,93)"> =3D</spa=
n><span class=3D"inbox-inbox-pl-c1" style=3D"box-sizing:border-box;color:rg=
b(0,134,179)"> this</span><span class=3D"inbox-inbox-pl-k" style=3D"box-siz=
ing:border-box;color:rgb(167,29,93)">.</span><span class=3D"inbox-inbox-pl-=
smi" style=3D"box-sizing:border-box;color:rgb(51,51,51)">state</span><span =
class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,=
93)">.</span><span class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-=
box;color:rgb(51,51,51)">messages</span><span class=3D"inbox-inbox-pl-k" st=
yle=3D"box-sizing:border-box;color:rgb(167,29,93)">.</span><span class=3D"i=
nbox-inbox-pl-en" style=3D"box-sizing:border-box;color:rgb(121,93,163)">map=
</span>(
        <span class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-box;c=
olor:rgb(51,51,51)">message</span> <span class=3D"inbox-inbox-pl-k" style=
=3D"box-sizing:border-box;color:rgb(167,29,93)">=3D&gt;</span> &lt;<span cl=
ass=3D"inbox-inbox-pl-ent" style=3D"box-sizing:border-box;color:rgb(99,163,=
92)"><span class=3D"inbox-inbox-pl-c1" style=3D"box-sizing:border-box;color=
:rgb(0,134,179)">Message</span></span> <span class=3D"inbox-inbox-pl-e" sty=
le=3D"box-sizing:border-box;color:rgb(121,93,163)">key</span><span class=3D=
"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,93)">=3D=
</span><span class=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">{=
</span><span class=3D"inbox-inbox-pl-s1" style=3D"box-sizing:border-box"><s=
pan class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-box;color:rgb(5=
1,51,51)">message</span><span class=3D"inbox-inbox-pl-k" style=3D"box-sizin=
g:border-box;color:rgb(167,29,93)">.</span><span class=3D"inbox-inbox-pl-sm=
i" style=3D"box-sizing:border-box;color:rgb(51,51,51)">id</span></span><spa=
n class=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">}</span>
        <span class=3D"inbox-inbox-pl-e" style=3D"box-sizing:border-box;col=
or:rgb(121,93,163)">text</span><span class=3D"inbox-inbox-pl-k" style=3D"bo=
x-sizing:border-box;color:rgb(167,29,93)">=3D</span><span class=3D"inbox-in=
box-pl-pse" style=3D"box-sizing:border-box">{</span><span class=3D"inbox-in=
box-pl-s1" style=3D"box-sizing:border-box"><span class=3D"inbox-inbox-pl-sm=
i" style=3D"box-sizing:border-box;color:rgb(51,51,51)">message</span><span =
class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,=
93)">.</span><span class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-=
box;color:rgb(51,51,51)">text</span></span><span class=3D"inbox-inbox-pl-ps=
e" style=3D"box-sizing:border-box">}</span>
        <span class=3D"inbox-inbox-pl-e" style=3D"box-sizing:border-box;col=
or:rgb(121,93,163)">mine</span><span class=3D"inbox-inbox-pl-k" style=3D"bo=
x-sizing:border-box;color:rgb(167,29,93)">=3D</span><span class=3D"inbox-in=
box-pl-pse" style=3D"box-sizing:border-box">{</span><span class=3D"inbox-in=
box-pl-s1" style=3D"box-sizing:border-box"><span class=3D"inbox-inbox-pl-sm=
i" style=3D"box-sizing:border-box;color:rgb(51,51,51)">message</span><span =
class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,=
93)">.</span><span class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-=
box;color:rgb(51,51,51)">mine</span></span><span class=3D"inbox-inbox-pl-ps=
e" style=3D"box-sizing:border-box">}</span> /&gt;
    );
<span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(1=
67,29,93)">    return</span><span class=3D"inbox-inbox-pl-smi" style=3D"box=
-sizing:border-box;color:rgb(51,51,51)"> messages</span>;
}</pre></div><p style=3D"box-sizing:border-box;margin-top:0px;margin-bottom=
:16px;color:rgb(36,41,46);font-family:-apple-system,system-ui,&quot;segoe u=
i&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;sego=
e ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:14px">I&#39;d ideall=
y expect something like:</p><div class=3D"inbox-inbox-highlight inbox-inbox=
-highlight-source-js-jsx" style=3D"box-sizing:border-box;margin-bottom:16px=
;color:rgb(36,41,46);font-family:-apple-system,system-ui,&quot;segoe ui&quo=
t;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;segoe ui =
emoji&quot;,&quot;segoe ui symbol&quot;;font-size:14px;overflow:visible"><p=
re style=3D"box-sizing:border-box;font-family:sfmono-regular,consolas,&quot=
;liberation mono&quot;,menlo,courier,monospace;font-size:11.9px;margin-top:=
0px;margin-bottom:0px;font-stretch:normal;line-height:1.45;word-wrap:normal=
;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-radius=
:3px;word-break:normal"><span class=3D"inbox-inbox-pl-en" style=3D"box-sizi=
ng:border-box;color:rgb(121,93,163)">render</span>() {
    <span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:r=
gb(167,29,93)">const</span> <span class=3D"inbox-inbox-pl-smi" style=3D"box=
-sizing:border-box;color:rgb(51,51,51)">messages</span><span class=3D"inbox=
-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,93)"> =3D</spa=
n><span class=3D"inbox-inbox-pl-c1" style=3D"box-sizing:border-box;color:rg=
b(0,134,179)"> this</span><span class=3D"inbox-inbox-pl-k" style=3D"box-siz=
ing:border-box;color:rgb(167,29,93)">.</span><span class=3D"inbox-inbox-pl-=
smi" style=3D"box-sizing:border-box;color:rgb(51,51,51)">state</span><span =
class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,=
93)">.</span><span class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-=
box;color:rgb(51,51,51)">messages</span><span class=3D"inbox-inbox-pl-k" st=
yle=3D"box-sizing:border-box;color:rgb(167,29,93)">.</span><span class=3D"i=
nbox-inbox-pl-en" style=3D"box-sizing:border-box;color:rgb(121,93,163)">map=
</span>(
        <span class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-box;c=
olor:rgb(51,51,51)">message</span> <span class=3D"inbox-inbox-pl-k" style=
=3D"box-sizing:border-box;color:rgb(167,29,93)">=3D&gt;</span> &lt;<span cl=
ass=3D"inbox-inbox-pl-ent" style=3D"box-sizing:border-box;color:rgb(99,163,=
92)"><span class=3D"inbox-inbox-pl-c1" style=3D"box-sizing:border-box;color=
:rgb(0,134,179)">Message</span></span> <span class=3D"inbox-inbox-pl-e" sty=
le=3D"box-sizing:border-box;color:rgb(121,93,163)">key</span><span class=3D=
"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,93)">=3D=
</span><span class=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">{=
</span><span class=3D"inbox-inbox-pl-s1" style=3D"box-sizing:border-box"><s=
pan class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-box;color:rgb(5=
1,51,51)">message</span><span class=3D"inbox-inbox-pl-k" style=3D"box-sizin=
g:border-box;color:rgb(167,29,93)">.</span><span class=3D"inbox-inbox-pl-sm=
i" style=3D"box-sizing:border-box;color:rgb(51,51,51)">id</span></span><spa=
n class=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">}</span>
                            <span class=3D"inbox-inbox-pl-e" style=3D"box-s=
izing:border-box;color:rgb(121,93,163)">text</span><span class=3D"inbox-inb=
ox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,93)">=3D</span><sp=
an class=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">{</span><sp=
an class=3D"inbox-inbox-pl-s1" style=3D"box-sizing:border-box"><span class=
=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-box;color:rgb(51,51,51)"=
>message</span><span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-=
box;color:rgb(167,29,93)">.</span><span class=3D"inbox-inbox-pl-smi" style=
=3D"box-sizing:border-box;color:rgb(51,51,51)">text</span></span><span clas=
s=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">}</span>
                            <span class=3D"inbox-inbox-pl-e" style=3D"box-s=
izing:border-box;color:rgb(121,93,163)">mine</span><span class=3D"inbox-inb=
ox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,93)">=3D</span><sp=
an class=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">{</span><sp=
an class=3D"inbox-inbox-pl-s1" style=3D"box-sizing:border-box"><span class=
=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-box;color:rgb(51,51,51)"=
>message</span><span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-=
box;color:rgb(167,29,93)">.</span><span class=3D"inbox-inbox-pl-smi" style=
=3D"box-sizing:border-box;color:rgb(51,51,51)">mine</span></span><span clas=
s=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">}</span> /&gt;
    );
<span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(1=
67,29,93)">    return</span><span class=3D"inbox-inbox-pl-smi" style=3D"box=
-sizing:border-box;color:rgb(51,51,51)"> messages</span>;
}</pre></div><p style=3D"box-sizing:border-box;margin-top:0px;margin-bottom=
:16px;color:rgb(36,41,46);font-family:-apple-system,system-ui,&quot;segoe u=
i&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;sego=
e ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:14px">It&#39;s even =
odder when I try to leave the argument to the arrow function in the line ab=
ove:</p><div class=3D"inbox-inbox-highlight inbox-inbox-highlight-source-js=
-jsx" style=3D"box-sizing:border-box;margin-bottom:16px;color:rgb(36,41,46)=
;font-family:-apple-system,system-ui,&quot;segoe ui&quot;,helvetica,arial,s=
ans-serif,&quot;apple color emoji&quot;,&quot;segoe ui emoji&quot;,&quot;se=
goe ui symbol&quot;;font-size:14px;overflow:visible"><pre style=3D"box-sizi=
ng:border-box;font-family:sfmono-regular,consolas,&quot;liberation mono&quo=
t;,menlo,courier,monospace;font-size:11.9px;margin-top:0px;margin-bottom:0p=
x;font-stretch:normal;line-height:1.45;word-wrap:normal;padding:16px;overfl=
ow:auto;background-color:rgb(246,248,250);border-radius:3px;word-break:norm=
al"><span class=3D"inbox-inbox-pl-en" style=3D"box-sizing:border-box;color:=
rgb(121,93,163)">render</span>() {
    <span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:r=
gb(167,29,93)">const</span> <span class=3D"inbox-inbox-pl-smi" style=3D"box=
-sizing:border-box;color:rgb(51,51,51)">messages</span><span class=3D"inbox=
-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,93)"> =3D</spa=
n><span class=3D"inbox-inbox-pl-c1" style=3D"box-sizing:border-box;color:rg=
b(0,134,179)"> this</span><span class=3D"inbox-inbox-pl-k" style=3D"box-siz=
ing:border-box;color:rgb(167,29,93)">.</span><span class=3D"inbox-inbox-pl-=
smi" style=3D"box-sizing:border-box;color:rgb(51,51,51)">state</span><span =
class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,=
93)">.</span><span class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-=
box;color:rgb(51,51,51)">messages</span><span class=3D"inbox-inbox-pl-k" st=
yle=3D"box-sizing:border-box;color:rgb(167,29,93)">.</span><span class=3D"i=
nbox-inbox-pl-en" style=3D"box-sizing:border-box;color:rgb(121,93,163)">map=
</span>(<span class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-box;c=
olor:rgb(51,51,51)">message</span> <span class=3D"inbox-inbox-pl-k" style=
=3D"box-sizing:border-box;color:rgb(167,29,93)">=3D&gt;</span>
                                             &lt;<span class=3D"inbox-inbox=
-pl-ent" style=3D"box-sizing:border-box;color:rgb(99,163,92)"><span class=
=3D"inbox-inbox-pl-c1" style=3D"box-sizing:border-box;color:rgb(0,134,179)"=
>Message</span></span> <span class=3D"inbox-inbox-pl-e" style=3D"box-sizing=
:border-box;color:rgb(121,93,163)">key</span><span class=3D"inbox-inbox-pl-=
k" style=3D"box-sizing:border-box;color:rgb(167,29,93)">=3D</span><span cla=
ss=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">{</span><span cla=
ss=3D"inbox-inbox-pl-s1" style=3D"box-sizing:border-box"><span class=3D"inb=
ox-inbox-pl-smi" style=3D"box-sizing:border-box;color:rgb(51,51,51)">messag=
e</span><span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;col=
or:rgb(167,29,93)">.</span><span class=3D"inbox-inbox-pl-smi" style=3D"box-=
sizing:border-box;color:rgb(51,51,51)">timestamp</span></span><span class=
=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">}</span>
                                             <span class=3D"inbox-inbox-pl-=
e" style=3D"box-sizing:border-box;color:rgb(121,93,163)">text</span><span c=
lass=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,9=
3)">=3D</span><span class=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border=
-box">{</span><span class=3D"inbox-inbox-pl-s1" style=3D"box-sizing:border-=
box"><span class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-box;colo=
r:rgb(51,51,51)">message</span><span class=3D"inbox-inbox-pl-k" style=3D"bo=
x-sizing:border-box;color:rgb(167,29,93)">.</span><span class=3D"inbox-inbo=
x-pl-smi" style=3D"box-sizing:border-box;color:rgb(51,51,51)">text</span></=
span><span class=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">}</=
span>
                                             <span class=3D"inbox-inbox-pl-=
e" style=3D"box-sizing:border-box;color:rgb(121,93,163)">mine</span><span c=
lass=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,9=
3)">=3D</span><span class=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border=
-box">{</span><span class=3D"inbox-inbox-pl-s1" style=3D"box-sizing:border-=
box"><span class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-box;colo=
r:rgb(51,51,51)">message</span><span class=3D"inbox-inbox-pl-k" style=3D"bo=
x-sizing:border-box;color:rgb(167,29,93)">.</span><span class=3D"inbox-inbo=
x-pl-smi" style=3D"box-sizing:border-box;color:rgb(51,51,51)">mine</span></=
span><span class=3D"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">}</=
span> /&gt;
                                            );
<span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(1=
67,29,93)">    return</span><span class=3D"inbox-inbox-pl-smi" style=3D"box=
-sizing:border-box;color:rgb(51,51,51)"> messages</span>;
}</pre></div><p style=3D"box-sizing:border-box;margin-top:0px;margin-bottom=
:16px;color:rgb(36,41,46);font-family:-apple-system,system-ui,&quot;segoe u=
i&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;sego=
e ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:14px">For this secon=
d case, I&#39;d hope to get:</p><div class=3D"inbox-inbox-highlight inbox-i=
nbox-highlight-source-js-jsx" style=3D"box-sizing:border-box;margin-bottom:=
16px;color:rgb(36,41,46);font-family:-apple-system,system-ui,&quot;segoe ui=
&quot;,helvetica,arial,sans-serif,&quot;apple color emoji&quot;,&quot;segoe=
 ui emoji&quot;,&quot;segoe ui symbol&quot;;font-size:14px;overflow:visible=
"><pre style=3D"box-sizing:border-box;font-family:sfmono-regular,consolas,&=
quot;liberation mono&quot;,menlo,courier,monospace;font-size:11.9px;margin-=
top:0px;margin-bottom:0px;font-stretch:normal;line-height:1.45;word-wrap:no=
rmal;padding:16px;overflow:auto;background-color:rgb(246,248,250);border-ra=
dius:3px;word-break:normal"><span class=3D"inbox-inbox-pl-en" style=3D"box-=
sizing:border-box;color:rgb(121,93,163)">render</span>() {
    <span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:r=
gb(167,29,93)">const</span> <span class=3D"inbox-inbox-pl-smi" style=3D"box=
-sizing:border-box;color:rgb(51,51,51)">messages</span><span class=3D"inbox=
-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,93)"> =3D</spa=
n><span class=3D"inbox-inbox-pl-c1" style=3D"box-sizing:border-box;color:rg=
b(0,134,179)"> this</span><span class=3D"inbox-inbox-pl-k" style=3D"box-siz=
ing:border-box;color:rgb(167,29,93)">.</span><span class=3D"inbox-inbox-pl-=
smi" style=3D"box-sizing:border-box;color:rgb(51,51,51)">state</span><span =
class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(167,29,=
93)">.</span><span class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-=
box;color:rgb(51,51,51)">messages</span><span class=3D"inbox-inbox-pl-k" st=
yle=3D"box-sizing:border-box;color:rgb(167,29,93)">.</span><span class=3D"i=
nbox-inbox-pl-en" style=3D"box-sizing:border-box;color:rgb(121,93,163)">map=
</span>(<span class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-box;c=
olor:rgb(51,51,51)">message</span> <span class=3D"inbox-inbox-pl-k" style=
=3D"box-sizing:border-box;color:rgb(167,29,93)">=3D&gt;</span>
        &lt;<span class=3D"inbox-inbox-pl-ent" style=3D"box-sizing:border-b=
ox;color:rgb(99,163,92)"><span class=3D"inbox-inbox-pl-c1" style=3D"box-siz=
ing:border-box;color:rgb(0,134,179)">Message</span></span> <span class=3D"i=
nbox-inbox-pl-e" style=3D"box-sizing:border-box;color:rgb(121,93,163)">key<=
/span><span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color=
:rgb(167,29,93)">=3D</span><span class=3D"inbox-inbox-pl-pse" style=3D"box-=
sizing:border-box">{</span><span class=3D"inbox-inbox-pl-s1" style=3D"box-s=
izing:border-box"><span class=3D"inbox-inbox-pl-smi" style=3D"box-sizing:bo=
rder-box;color:rgb(51,51,51)">message</span><span class=3D"inbox-inbox-pl-k=
" style=3D"box-sizing:border-box;color:rgb(167,29,93)">.</span><span class=
=3D"inbox-inbox-pl-smi" style=3D"box-sizing:border-box;color:rgb(51,51,51)"=
>timestamp</span></span><span class=3D"inbox-inbox-pl-pse" style=3D"box-siz=
ing:border-box">}</span>
                 <span class=3D"inbox-inbox-pl-e" style=3D"box-sizing:borde=
r-box;color:rgb(121,93,163)">text</span><span class=3D"inbox-inbox-pl-k" st=
yle=3D"box-sizing:border-box;color:rgb(167,29,93)">=3D</span><span class=3D=
"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">{</span><span class=3D=
"inbox-inbox-pl-s1" style=3D"box-sizing:border-box"><span class=3D"inbox-in=
box-pl-smi" style=3D"box-sizing:border-box;color:rgb(51,51,51)">message</sp=
an><span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rg=
b(167,29,93)">.</span><span class=3D"inbox-inbox-pl-smi" style=3D"box-sizin=
g:border-box;color:rgb(51,51,51)">text</span></span><span class=3D"inbox-in=
box-pl-pse" style=3D"box-sizing:border-box">}</span>
                 <span class=3D"inbox-inbox-pl-e" style=3D"box-sizing:borde=
r-box;color:rgb(121,93,163)">mine</span><span class=3D"inbox-inbox-pl-k" st=
yle=3D"box-sizing:border-box;color:rgb(167,29,93)">=3D</span><span class=3D=
"inbox-inbox-pl-pse" style=3D"box-sizing:border-box">{</span><span class=3D=
"inbox-inbox-pl-s1" style=3D"box-sizing:border-box"><span class=3D"inbox-in=
box-pl-smi" style=3D"box-sizing:border-box;color:rgb(51,51,51)">message</sp=
an><span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rg=
b(167,29,93)">.</span><span class=3D"inbox-inbox-pl-smi" style=3D"box-sizin=
g:border-box;color:rgb(51,51,51)">mine</span></span><span class=3D"inbox-in=
box-pl-pse" style=3D"box-sizing:border-box">}</span> /&gt;
    );
<span class=3D"inbox-inbox-pl-k" style=3D"box-sizing:border-box;color:rgb(1=
67,29,93)">    return</span><span class=3D"inbox-inbox-pl-smi" style=3D"box=
-sizing:border-box;color:rgb(51,51,51)"> messages</span>;
}</pre></div><p style=3D"box-sizing:border-box;margin-top:0px;color:rgb(36,=
41,46);font-family:-apple-system,system-ui,&quot;segoe ui&quot;,helvetica,a=
rial,sans-serif,&quot;apple color emoji&quot;,&quot;segoe ui emoji&quot;,&q=
uot;segoe ui symbol&quot;;font-size:14px;margin-bottom:0px">(I get such res=
ults if I wrap the return expression in parentheses)</p></div>

--94eb2c0763c8c2c958054a10e2be--




Acknowledgement sent to Dražen <kermit666@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#26001; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 14 Jul 2018 16:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.