From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mitchel Humpherys Newsgroups: gmane.emacs.bugs Subject: bug#30225: 27.0.50; jsx: Arrow function in attribute breaks indentation Date: Mon, 22 Jan 2018 17:27:53 -0800 Message-ID: <87shaxe546.fsf@grinchel.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1516670932 7316 195.159.176.226 (23 Jan 2018 01:28:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 23 Jan 2018 01:28:52 +0000 (UTC) To: 30225@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 23 02:28:48 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ednO3-0000dU-OG for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Jan 2018 02:28:31 +0100 Original-Received: from localhost ([::1]:52951 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ednQ4-00063N-42 for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jan 2018 20:30:36 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ednPa-0005og-FO for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 20:30:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ednPW-0005DJ-G1 for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 20:30:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59149) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ednPW-0005Cv-Ag for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 20:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ednPW-0006Dy-4Y for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 20:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Mitchel Humpherys Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jan 2018 01:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 30225 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.151667095123826 (code B ref -1); Tue, 23 Jan 2018 01:30:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jan 2018 01:29:11 +0000 Original-Received: from localhost ([127.0.0.1]:38810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ednOg-0006CD-M3 for submit@debbugs.gnu.org; Mon, 22 Jan 2018 20:29:10 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ednOf-0006Bz-4w for submit@debbugs.gnu.org; Mon, 22 Jan 2018 20:29:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ednOY-0004Na-Oi for submit@debbugs.gnu.org; Mon, 22 Jan 2018 20:29:04 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:57762) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ednOY-0004NH-LJ for submit@debbugs.gnu.org; Mon, 22 Jan 2018 20:29:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ednOX-0005WW-92 for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 20:29:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ednOT-0004LU-AP for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 20:29:01 -0500 Original-Received: from mail-pg0-x22c.google.com ([2607:f8b0:400e:c05::22c]:43893) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ednOT-0004L0-3C for bug-gnu-emacs@gnu.org; Mon, 22 Jan 2018 20:28:57 -0500 Original-Received: by mail-pg0-x22c.google.com with SMTP id n17so8503381pgf.10 for ; Mon, 22 Jan 2018 17:28:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=vll5CLtljRaps9HObUBCimmxDEIG5xG5Wiln3TQUzkw=; b=Ohkuz899CeQW4vHkSiAV9s9j9pzOOg3hZnv2UqpNHrKZ03S4IFTCmBFDhdBd4EcA+u vLOIX1BDZWPyq0sBOeEBP0exLpxQGQsirfasD6fFGgzvASsm8FrTWdc3d91/6IPV4Tiw yBVuhOBabT/WIY3+cSrsYz40F5OiAJrVaCnBj5ugtc2LVuz4pJtinKyEw3ZEQvurXuuy l3Ecz3jUdezZZFtqcMCaxreGLceZnuKt8IlAEAie0QmDkeY0ZbgMFHIcwTDlkSsAEkz/ V2u5JGIcynjicPOq8i19Dk9d3iszCtKsiF1vgYFkBYcG4ky8MpmScHrMIJ+A8nnuhTlj ePGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=vll5CLtljRaps9HObUBCimmxDEIG5xG5Wiln3TQUzkw=; b=jsplni59PGIU46+mqn2TamOZSIoU54G2tJprOHfPTaiCMLcsfZHXbJJqjk3Sq5PRkR R//zn8K3LDuboCqjkTkVEy6RUTSWbFghXXK2vb+C5jlRgQRx1j3DrqyGBX1Eg/GtpIPp rEfCD7ZX3Rul7Fkd/2aZgI1DCQtGJfOI4L8cFUqQJeHsAvh7W7gTwqTdk4hxGd0zOux1 GiaE51u+6Yd79rrB7nb9bXd/SvvNnAh3/OCrpd1s93CIk3iIqKtCneHfobtuNp79xNID 6pXCLeBsz3jZuKE57SlxLAXrI3r0UHHR180leYIKjZuXoLOXodNLg/QiSik2P5580mFi 3XDg== X-Gm-Message-State: AKwxytcYrD5LV+BOCgVVlBccCvIB7rF/R8cdHjgNb7Pvjq/oETkRMUpA ktfxGMm9XSlSbVFBHKUYG4D7ajd1 X-Google-Smtp-Source: AH8x226VNEA0kHF6KE64xRL8cVIwQovAOASZRejCpKAQHOA4Uv0HLEnuVfp8fwDNXxwcQgRS1wAdOw== X-Received: by 10.98.36.77 with SMTP id r74mr9345072pfj.31.1516670935204; Mon, 22 Jan 2018 17:28:55 -0800 (PST) Original-Received: from grinchel ([138.68.227.113]) by smtp.gmail.com with ESMTPSA id g77sm2032735pfk.49.2018.01.22.17.28.54 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Jan 2018 17:28:54 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:142415 Archived-At: I've noticed an indentation bug in js-jsx-mode. The following code doesn't indent properly (note the `value` attribute on the `select`): class MySelect extends React.Component { constructor(props) { super(props); this.state = { value: "", }; } render() { return ( ); } } However, when I move the `onChange` arrow function out it indents fine: class MySelect extends React.Component { constructor(props) { super(props); this.state = { value: "", }; this.onChange = this.onChange.bind(this); } render() { return ( ); } onChange(e) { this.setState({value: e.target.value}); } } In GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.26) of 2018-01-22 built on grinchel Repository revision: 2df391c202eeee0d575980555443a5e81b8f6b1f Windowing system distributor 'Fedora Project', version 11.0.11906000 System Description: Fedora release 27 (Twenty Seven) Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Mark set [2 times] Indenting region...done user-error: Beginning of history; no preceding item Making completion list... user-error: Beginning of history; no preceding item Configured using: 'configure --prefix=/home/mgalgs/opt/emacs-git' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS LCMS2 Important settings: value of $LC_CTYPE: en_US.UTF-8 value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8-unix Major mode: JSX Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils js advice sgml-mode dom json map seq byte-opt gv bytecomp byte-compile cconv imenu thingatpt cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 121749 8471) (symbols 48 23352 1) (miscs 40 54 97) (strings 32 37829 1944) (string-bytes 1 1118347) (vectors 16 17941) (vector-slots 8 534418 8920) (floats 8 52 297) (intervals 56 243 0) (buffers 992 13))