From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 01 14:00:33 2020 Received: (at submit) by debbugs.gnu.org; 1 Jun 2020 18:00:33 +0000 Received: from localhost ([127.0.0.1]:36966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfojh-0003Mt-Hs for submit@debbugs.gnu.org; Mon, 01 Jun 2020 14:00:33 -0400 Received: from lists.gnu.org ([209.51.188.17]:41548) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jfojf-0003Mk-7Q for submit@debbugs.gnu.org; Mon, 01 Jun 2020 14:00:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jfojd-00012a-Iz for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2020 14:00:30 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]:44062) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jfojc-0008Cz-Fc for bug-gnu-emacs@gnu.org; Mon, 01 Jun 2020 14:00:29 -0400 Received: by mail-ed1-x52a.google.com with SMTP id l1so7110502ede.11 for ; Mon, 01 Jun 2020 11:00:27 -0700 (PDT) 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=Zdw/LmM8aQddWe9vkQ5+Be5eijWaM0uSEfNko1dUneA=; b=eQx4741SaeqOhD963ZSHvwbVF32KY5pG7k5ulESPnaoZlnyI616/WmNpe+Xwm87+zG oWsyuZMQbCZImB6mONNQ85nMW/+J2c6NbCrQiPzY2PrujxrLFuu6eiDiizmtbBwKh2n2 H6oD1qRv0lrAWxvuCuYTcikyWZTlEBIrzekNDUMl5K4j58tduN89gkW/UNNFVbm8DyYb P0KtRPxlHDnnhjNDTIJXLnk1QD5efsS8Scy5eZoqL/usaxWPEVq8Bcor/E3PJ2aHE9Q3 Im9W9FIt6EkJZV6ywlrx0YICFhYBe+bWrIU0Ve0VRE+pjN69e9ldsVpjz2UnoaEaa+M3 hjaw== 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=Zdw/LmM8aQddWe9vkQ5+Be5eijWaM0uSEfNko1dUneA=; b=RpPjLXMCRfpDTAvcaqPJTYqovCZfWWo4wSPCNsZvFSj8Op0TabBBTgTWYwH63vEVZy 9f65t0WfH9q+cueT/kbgA9Ut6uZb5+fMoaRsP6PePhWFdSD0wz0tojYYP6Ix0DQW2Cmh YHdJ9pWMGiNBEty6G4TMS8dPHZQsKdZv3msvqVrmS1Ts37bn38bKc8porvXryfKKaKtk 6Z/W7o3JhuXFil8RflIr4efcNq+V/mL/C41dQl+A6d1mJPgB8WuoG3ek6xs0TNBUPO32 l9eNKvzHA4KzWTVN5NfPDwfMcOtJ0P2gKIB+ot3VH/cvE5YBLrCCtM4KgCiL6GoXYzuQ WAIQ== X-Gm-Message-State: AOAM531KbNFjCq/kFXPvWGLgxrtLLnPEtwVj95GU/jgf0ZKULwylmdGF ECXh3st+eHXJyEib/7U6CD5ebgXiDMXrB0+zhtf9UK2z X-Google-Smtp-Source: ABdhPJygEUB5EQNlH1AutK2d/CBZa7Uvfs6vKmcOoVRvDnIJwnKCLV63xElBtuA8yS6TjCau1NXb39IikjIzaowEGno= X-Received: by 2002:a50:d556:: with SMTP id f22mr23585034edj.307.1591034425991; Mon, 01 Jun 2020 11:00:25 -0700 (PDT) MIME-Version: 1.0 From: Brian Leung Date: Mon, 1 Jun 2020 10:59:50 -0700 Message-ID: Subject: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000c9670e05a709915d" Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=bkleung89@gmail.com; helo=mail-ed1-x52a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --000000000000c9670e05a709915d Content-Type: text/plain; charset="UTF-8" With a file App.js that looks like: import * as React from "react"; import { render } from "react-dom"; const App = () => { return (

hello

); }; render(, document.getElementById("root")); If you open the file in JS mode (Emacs 27), and move point inside of "abc", calling M-: (c-beginning-of-defun) gives the following error: Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil) copy-hash-table(nil) c-forward-<>-arglist(nil) c-backward-<>-arglist(nil nil) c-looking-at-decl-block(99 nil) c-most-enclosing-decl-block((117 99 88 (40 . 50))) c-widen-to-enclosing-decl-scope((117 99 88 (40 . 50)) 1 234) c-beginning-of-defun() eval((c-beginning-of-defun) t) eval-expression((c-beginning-of-defun) nil nil 127) funcall-interactively(eval-expression (c-beginning-of-defun) nil nil 127) call-interactively(eval-expression nil nil) command-execute(eval-expression) Manually invoking C-M-a inside the double quotes should end the same way. In GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20) Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 System Description: NixOS 20.09 (Nightingale) --000000000000c9670e05a709915d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


With a file App.js that looks like:

import = * as React from "react";
import { render } from "react-do= m";

const App =3D () =3D> {
=C2=A0 return (
=C2=A0 =C2= =A0 <div>
=C2=A0 =C2=A0 =C2=A0 <h1 id=3D"abc">hell= o</h1>
=C2=A0 =C2=A0 =C2=A0 <SearchParams />
=C2=A0 =C2= =A0 </div>
=C2=A0 );
};

render(<App />, document.g= etElementById("root"));


If you open the file in JS mod= e (Emacs 27), and move point inside of
"abc", calling

M= -: (c-beginning-of-defun)

gives the following error:

Debugger= entered--Lisp error: (wrong-type-argument hash-table-p nil)
=C2=A0 copy= -hash-table(nil)
=C2=A0 c-forward-<>-arglist(nil)
=C2=A0 c-back= ward-<>-arglist(nil nil)
=C2=A0 c-looking-at-decl-block(99 nil)=C2=A0 c-most-enclosing-decl-block((117 99 88 (40 . 50)))
=C2=A0 c-wide= n-to-enclosing-decl-scope((117 99 88 (40 . 50)) 1 234)
=C2=A0 c-beginnin= g-of-defun()
=C2=A0 eval((c-beginning-of-defun) t)
=C2=A0 eval-expres= sion((c-beginning-of-defun) nil nil 127)
=C2=A0 funcall-interactively(ev= al-expression (c-beginning-of-defun) nil nil 127)
=C2=A0 call-interactiv= ely(eval-expression nil nil)
=C2=A0 command-execute(eval-expression)
=
Manually invoking C-M-a inside the double quotes should end the same wa= y.

In GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version = 3.24.20)
Windowing system distributor 'The X.Org Foundation', ve= rsion 11.0.12008000
System Description: NixOS 20.09 (Nightingale)
--000000000000c9670e05a709915d-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 02 13:12:26 2020 Received: (at 41649) by debbugs.gnu.org; 2 Jun 2020 17:12:26 +0000 Received: from localhost ([127.0.0.1]:40825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgASg-0002eA-BY for submit@debbugs.gnu.org; Tue, 02 Jun 2020 13:12:26 -0400 Received: from colin.muc.de ([193.149.48.1]:40760 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jgASd-0002e0-Tr for 41649@debbugs.gnu.org; Tue, 02 Jun 2020 13:12:24 -0400 Received: (qmail 19098 invoked by uid 3782); 2 Jun 2020 17:12:21 -0000 Date: 2 Jun 2020 17:12:21 -0000 Message-ID: <20200602171221.19097.qmail@mail.muc.de> From: Alan Mackenzie To: Brian Leung Subject: Re: bug#41649: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode Organization: muc.de e.V. In-Reply-To: X-Newsgroups: gnu.emacs.bug User-Agent: tin/2.4.4-20191224 ("Millburn") (FreeBSD/11.3-RELEASE-p9 (amd64)) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41649 Cc: 41649@debbugs.gnu.org, Daniel Colascione X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello Brian. In article you wrote: > [-- text/plain, encoding 7bit, charset: UTF-8, 44 lines --] > With a file App.js that looks like: > import * as React from "react"; > import { render } from "react-dom"; > const App = () => { > return ( >
>

hello

> >
> ); > }; > render(, document.getElementById("root")); > If you open the file in JS mode (Emacs 27), and move point inside of > "abc", calling > M-: (c-beginning-of-defun) That looks like a strange thing to do. JS mode has its own js-beginning-of-defun. But wait - beginning-of-defun-function is set to c-beginning-of-defun, which is probably why you reported the bug the way you did. c-beginning-of-defun won't work, because a suitable member or derivative of CC Mode hasn't been fully initialised. > gives the following error: > Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil) > copy-hash-table(nil) > c-forward-<>-arglist(nil) > c-backward-<>-arglist(nil nil) > c-looking-at-decl-block(99 nil) > c-most-enclosing-decl-block((117 99 88 (40 . 50))) > c-widen-to-enclosing-decl-scope((117 99 88 (40 . 50)) 1 234) > c-beginning-of-defun() > eval((c-beginning-of-defun) t) > eval-expression((c-beginning-of-defun) nil nil 127) > funcall-interactively(eval-expression (c-beginning-of-defun) nil nil 127) > call-interactively(eval-expression nil nil) > command-execute(eval-expression) > Manually invoking C-M-a inside the double quotes should end the same way. It does. The problem seems to stem from the top-level function #'js-mode. Early on, it invokes (c-init-language-vars js-mode) , which initialises the CC Mode language variables to (mostly) their Java Mode values. js-mode continues by overwriting the local value of quite a few of these variables, including beginning-of-defun-function. js-mode then invokes (c-init-language-vars js-mode) a second time, which initialises the language variables again, in particular, those variables which just got a local value, including beginning-of-defun-function. Daniel, what is going on, here? Is this just a simple coding error, where the second c-init-language-vars should have been removed at some stage? > In GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20) > Windowing system distributor 'The X.Org Foundation', version 11.0.12008000 > System Description: NixOS 20.09 (Nightingale) -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 02 13:28:25 2020 Received: (at 41649) by debbugs.gnu.org; 2 Jun 2020 17:28:25 +0000 Received: from localhost ([127.0.0.1]:40842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgAi6-000315-68 for submit@debbugs.gnu.org; Tue, 02 Jun 2020 13:28:25 -0400 Received: from mail-ej1-f45.google.com ([209.85.218.45]:33137) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgAi4-00030s-Fs for 41649@debbugs.gnu.org; Tue, 02 Jun 2020 13:28:21 -0400 Received: by mail-ej1-f45.google.com with SMTP id n24so13581395ejd.0 for <41649@debbugs.gnu.org>; Tue, 02 Jun 2020 10:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DK2FiD0jBIeuoVp/+3K1XAfq7RQtHhrgLWoKQbs7SZw=; b=qwEn98tbF4Q1xeczGRipubDNkAokcbaKC21ewLIEJpiGzAb5gdtW9bOCfROMzDvVUW hqh7T7W8ro6ljkqJ0HNnUhVsRU/PTimiLk1bOqGzrY3OQUDlDxbN/XV4Hwp+CTLPqMnX PO4KYdKlufANbEtXnWTzODbWkyXka2VS/9Vq8TxxK1jtlt3nKNp05IYaVWqOBvKB3zXo XR8rLNseGAK7JDwbzAaV0TcbaDMnrDrhnx22ld7bOoUhbMU4+tHdmdPpCe22rar0rdjD it9cTPx4aLwRvYCLj3d+V29fjL5pL0BzgbtsbFTkrqKgjiXb8BnhB3bMur8ejJ7PDeJ6 P9WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DK2FiD0jBIeuoVp/+3K1XAfq7RQtHhrgLWoKQbs7SZw=; b=FMTxqLQyPGiJIxpffn27qVBlIzbiBZgqs9081f7qS1qJwtRMojA4CaQy8FzhkwRVlN FXQyNAG2lx49KQUHXZl6IArSlT+R1AWHRtS5plISg3um14OfSCiZk53gB/rG08jNxeun OlmeewERabHtqHXC832KrCm0rFIa7t5CHVPZ9LAWF1wA1xIbpA1e7t6s3/TOqfR9tKD/ 3WR6G4cLS+O87hF3mj2sI5AgdedaAzNX+caIRC5UZf120FQ4mwXj8S6epb/EY70WBBEs MhPMSbJW8Z/uSTR3HIMLuA9HB5vV2G1p29c9drYB0dO55EbpBVybwR48iaLr0f5wOfLS 6yNw== X-Gm-Message-State: AOAM531g6MGNGUpiF6ECwTfJUz3MHsBNumfx+BzBOFu+jb6LGnNUHOmJ qBf0qR5qyC//g3bNXqXtCeJL1DuqVjdWjlacdeo= X-Google-Smtp-Source: ABdhPJzIOQN/q4d+YND0cRgQZI9HgSv/7E6XNxTcVRhTUvvh2YaIU3CFCfsy3v5bn09k3QJpAD/qYnx5suXkRahGJVA= X-Received: by 2002:a17:906:3e15:: with SMTP id k21mr7579807eji.525.1591118894468; Tue, 02 Jun 2020 10:28:14 -0700 (PDT) MIME-Version: 1.0 References: <20200602171221.19097.qmail@mail.muc.de> In-Reply-To: <20200602171221.19097.qmail@mail.muc.de> From: Brian Leung Date: Tue, 2 Jun 2020 10:27:38 -0700 Message-ID: Subject: Re: bug#41649: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode To: Alan Mackenzie Content-Type: multipart/alternative; boundary="00000000000080137005a71d3cc9" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 41649 Cc: 41649@debbugs.gnu.org, Daniel Colascione X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --00000000000080137005a71d3cc9 Content-Type: text/plain; charset="UTF-8" > Daniel, what is going on, here? Is this just a simple coding error, > where the second c-init-language-vars should have been removed at some > stage? I wasn't sure if js-beginning-of-defun was preferred here since it does not seem to detect ES2015 arrow functions like what is used here, whereas c-beginning-of-defun handles them fine outside of ReactJS cases: if you try M-: js-beginning-of-defun on my React example, point moves straight from the class declaration to the imports, which is not desirable. Should I file a separate ticket for that? On Tue, Jun 2, 2020 at 10:12 AM Alan Mackenzie wrote: > Hello Brian. > > In article you wrote: > > [-- text/plain, encoding 7bit, charset: UTF-8, 44 lines --] > > > With a file App.js that looks like: > > > import * as React from "react"; > > import { render } from "react-dom"; > > > const App = () => { > > return ( > >
> >

hello

> > > >
> > ); > > }; > > > render(, document.getElementById("root")); > > > > If you open the file in JS mode (Emacs 27), and move point inside of > > "abc", calling > > > M-: (c-beginning-of-defun) > > That looks like a strange thing to do. JS mode has its own > js-beginning-of-defun. > > But wait - beginning-of-defun-function is set to c-beginning-of-defun, > which is probably why you reported the bug the way you did. > > c-beginning-of-defun won't work, because a suitable member or derivative > of CC Mode hasn't been fully initialised. > > > gives the following error: > > > Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil) > > copy-hash-table(nil) > > c-forward-<>-arglist(nil) > > c-backward-<>-arglist(nil nil) > > c-looking-at-decl-block(99 nil) > > c-most-enclosing-decl-block((117 99 88 (40 . 50))) > > c-widen-to-enclosing-decl-scope((117 99 88 (40 . 50)) 1 234) > > c-beginning-of-defun() > > eval((c-beginning-of-defun) t) > > eval-expression((c-beginning-of-defun) nil nil 127) > > funcall-interactively(eval-expression (c-beginning-of-defun) nil nil > 127) > > call-interactively(eval-expression nil nil) > > command-execute(eval-expression) > > > Manually invoking C-M-a inside the double quotes should end the same way. > > It does. > > The problem seems to stem from the top-level function #'js-mode. Early > on, it invokes > > (c-init-language-vars js-mode) > > , which initialises the CC Mode language variables to (mostly) their > Java Mode values. js-mode continues by overwriting the local value of > quite a few of these variables, including beginning-of-defun-function. > > js-mode then invokes > > (c-init-language-vars js-mode) > > a second time, which initialises the language variables again, in > particular, those variables which just got a local value, including > beginning-of-defun-function. > > Daniel, what is going on, here? Is this just a simple coding error, > where the second c-init-language-vars should have been removed at some > stage? > > > In GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20) > > Windowing system distributor 'The X.Org Foundation', version > 11.0.12008000 > > System Description: NixOS 20.09 (Nightingale) > > -- > Alan Mackenzie (Nuremberg, Germany). > > --00000000000080137005a71d3cc9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> Daniel, what is going on, here?=C2=A0 Is this just a = simple coding error,
> where the second c-init-language-vars should h= ave been removed at some
> stage?

I was= n't sure if js-beginning-of-defun was preferred here since it does not = seem to detect ES2015 arrow functions like what is used here, whereas c-beg= inning-of-defun handles them fine outside of ReactJS cases: if you try M-: = js-beginning-of-defun on my React example, point moves straight from the cl= ass declaration to the imports, which is not desirable. Should I file a sep= arate ticket for that?

On Tue, Jun 2, 2020 at 10:12 AM Alan Macken= zie <acm@muc.de> wrote:
Hello Brian.

In article <mailman.928.1591034465.2541.bug-gnu-emacs@gnu.or= g> you wrote:
> [-- text/plain, encoding 7bit, charset: UTF-8, 44 lines --]

> With a file App.js that looks like:

> import * as React from "react";
> import { render } from "react-dom";

> const App =3D () =3D> {
>=C2=A0 =C2=A0return (
>=C2=A0 =C2=A0 =C2=A0<div>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0<h1 id=3D"abc">hello</h1&= gt;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0<SearchParams />
>=C2=A0 =C2=A0 =C2=A0</div>
>=C2=A0 =C2=A0);
> };

> render(<App />, document.getElementById("root"));


> If you open the file in JS mode (Emacs 27), and move point inside of > "abc", calling

> M-: (c-beginning-of-defun)

That looks like a strange thing to do.=C2=A0 JS mode has its own
js-beginning-of-defun.

But wait - beginning-of-defun-function is set to c-beginning-of-defun,
which is probably why you reported the bug the way you did.

c-beginning-of-defun won't work, because a suitable member or derivativ= e
of CC Mode hasn't been fully initialised.

> gives the following error:

> Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil) >=C2=A0 =C2=A0copy-hash-table(nil)
>=C2=A0 =C2=A0c-forward-<>-arglist(nil)
>=C2=A0 =C2=A0c-backward-<>-arglist(nil nil)
>=C2=A0 =C2=A0c-looking-at-decl-block(99 nil)
>=C2=A0 =C2=A0c-most-enclosing-decl-block((117 99 88 (40 . 50)))
>=C2=A0 =C2=A0c-widen-to-enclosing-decl-scope((117 99 88 (40 . 50)) 1 23= 4)
>=C2=A0 =C2=A0c-beginning-of-defun()
>=C2=A0 =C2=A0eval((c-beginning-of-defun) t)
>=C2=A0 =C2=A0eval-expression((c-beginning-of-defun) nil nil 127)
>=C2=A0 =C2=A0funcall-interactively(eval-expression (c-beginning-of-defu= n) nil nil 127)
>=C2=A0 =C2=A0call-interactively(eval-expression nil nil)
>=C2=A0 =C2=A0command-execute(eval-expression)

> Manually invoking C-M-a inside the double quotes should end the same w= ay.

It does.

The problem seems to stem from the top-level function #'js-mode.=C2=A0 = Early
on, it invokes

=C2=A0 =C2=A0 (c-init-language-vars js-mode)

, which initialises the CC Mode language variables to (mostly) their
Java Mode values.=C2=A0 js-mode continues by overwriting the local value of=
quite a few of these variables, including beginning-of-defun-function.

js-mode then invokes

=C2=A0 =C2=A0 (c-init-language-vars js-mode)

a second time, which initialises the language variables again, in
particular, those variables which just got a local value, including
beginning-of-defun-function.

Daniel, what is going on, here?=C2=A0 Is this just a simple coding error, where the second c-init-language-vars should have been removed at some
stage?

> In GNU Emacs 27.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.= 20)
> Windowing system distributor 'The X.Org Foundation', version 1= 1.0.12008000
> System Description: NixOS 20.09 (Nightingale)

--
Alan Mackenzie (Nuremberg, Germany).

--00000000000080137005a71d3cc9-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 02 17:43:42 2020 Received: (at 41649) by debbugs.gnu.org; 2 Jun 2020 21:43:42 +0000 Received: from localhost ([127.0.0.1]:41160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgEhC-00050h-Cy for submit@debbugs.gnu.org; Tue, 02 Jun 2020 17:43:42 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:38479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgEhA-00050U-Nm for 41649@debbugs.gnu.org; Tue, 02 Jun 2020 17:43:41 -0400 Received: by mail-wr1-f48.google.com with SMTP id e1so181739wrt.5 for <41649@debbugs.gnu.org>; Tue, 02 Jun 2020 14:43:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=RTDLEE3XOvSv6ZvZUVlJ2qZ1T0RGM3yp5s7lJ+GtIrU=; b=QhSAH3hd3xhFgiPgMXI0YgmV1sTsMT1wlmWBFK1bWJc5peib1YKIgeJqoXZ0MV4p/O Ye4tw8AVoGDTssxQr9E0896Fp6jjQbNXW5lHvqGIEjwlHYIKBnStBBN7pyqsn3jKHOIV /JMUIfDWiLXc25SnRUu/vxacsBQQsU0nyOyhmY2bLPoWEqy+HejY3Qt0p8peoWCll0nq jMcSXQE57m0N6BDGb9u0KyAtQDMf8Sw1yzBScQP/xU9uFZryP9LYKonnZaiQ1H/2bEds Mjh3eGGaaDn+nwiGUWVJVUfkZc0VvVbXG1cXbD4Srqc4IwLSCnNegYif6Vt4SqQ2Wtmg j5+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RTDLEE3XOvSv6ZvZUVlJ2qZ1T0RGM3yp5s7lJ+GtIrU=; b=jpJRbxSd4Seang9Go3AWFsji7uEwLi/Wodf3AYvxumuTepA4IlfYLBdIKGVqIfH9zt l389QwtW0GTblYxVH7ilv6gOtyOphSErqMJKqFv5ZFvTBpZnuBnpfM2rJZqA6Sg5cb92 ag0ikWqYIGs2RlfrOquZHuInSYGUNBzKVej89duDtS4PxY6NJgi9dsAxzK0IFzVcnwpL V5btEaQDq03XHouvPeRKdSAtiQWKjmvJUGTRc0yOSCKvnlenPHrW1VryBzIlQkf5T92A oo1kqThp6GygYWKbwrwEkwocAw7H2ImfRsjlbQBSsutdjThC//JdK1jqI6jfXR1DeZ4M MOvw== X-Gm-Message-State: AOAM5308oPTM8eHbAx0foQMKqLPoEsLFVOniHOHAL7Ra31Nduq2xRwPH k9Mlxjzcmm49ezC6oJuaGuY1oAaI X-Google-Smtp-Source: ABdhPJzgG0dokX+UuiBQ4Lmf0rX2CUwKDEYUOmHCM9pxEO5Qizlzf/zqTeHbQnuUF4LEw3N9a9+mWg== X-Received: by 2002:a5d:5092:: with SMTP id a18mr27848268wrt.42.1591134214576; Tue, 02 Jun 2020 14:43:34 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id n189sm150629wmb.43.2020.06.02.14.43.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Jun 2020 14:43:34 -0700 (PDT) Subject: Re: bug#41649: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode To: Alan Mackenzie , Brian Leung References: <20200602171221.19097.qmail@mail.muc.de> From: Dmitry Gutov Message-ID: <0cbfd145-bdb2-4e1c-2f81-864c55894bc2@yandex.ru> Date: Wed, 3 Jun 2020 00:43:32 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200602171221.19097.qmail@mail.muc.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 41649 Cc: 41649@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) Hi Alan, On 02.06.2020 20:12, Alan Mackenzie wrote: > The problem seems to stem from the top-level function #'js-mode. Early > on, it invokes > > (c-init-language-vars js-mode) > > , which initialises the CC Mode language variables to (mostly) their > Java Mode values. js-mode continues by overwriting the local value of > quite a few of these variables, including beginning-of-defun-function. > > js-mode then invokes > > (c-init-language-vars js-mode) > > a second time, which initialises the language variables again, in > particular, those variables which just got a local value, including > beginning-of-defun-function. > > Daniel, what is going on, here? Is this just a simple coding error, > where the second c-init-language-vars should have been removed at some stage? I agree that the second call should be removed. You might be amused to look at the commit 4ad6c932a82, though, and see who the author is. :-) From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 02 17:45:37 2020 Received: (at 41649) by debbugs.gnu.org; 2 Jun 2020 21:45:38 +0000 Received: from localhost ([127.0.0.1]:41164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgEj3-00053u-Of for submit@debbugs.gnu.org; Tue, 02 Jun 2020 17:45:37 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:41236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgEj1-00053e-TI for 41649@debbugs.gnu.org; Tue, 02 Jun 2020 17:45:36 -0400 Received: by mail-wr1-f46.google.com with SMTP id j10so170906wrw.8 for <41649@debbugs.gnu.org>; Tue, 02 Jun 2020 14:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=BSVYVqpQM+JsgR7gfp8p5ifJLNh8utaDrRKKvriPXGE=; b=ZXNrH+vmxrLvfTyiHRMv1ToHYIHf0/WAoO+3zunCSEnHnKTbW6l5LIVvvwsilwgKwd RFScbkgC9O2lW4qmnPAzftr6aX8k9IjgZ65xTGrNpOb0eNu2CCVX2BrmdTCVcyl4uuVb /xOwTPsxrxEILE0tTDS7mlklcjFR5fpqzKkPYyom9Un3ioDIXtW9FTDhqB9IhbpC27zr SWW9WEW6zWjRGwOZQFm2Sw5NXjM+YYSsBJa6zuk4p5wwrhAuc5iugVQeyLcGCFS0GYH4 wZaDOxTfIkxvArrnGMVlq9AcQn4BSFOixOdwS6ej7CLR3SmA0crGT2YPOmKbXNz0Ir7z Gyeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=BSVYVqpQM+JsgR7gfp8p5ifJLNh8utaDrRKKvriPXGE=; b=Mc91zyLsvmYQYAAB8l5d+Gz56KVXPU2deA23qUHxtfwc98MZ70J7ldswbDpaV0vUXG TrkEjFatRetiRCt5qO498FWE6n0MTd3V4vqNYtRuR8lqvc4Ql6B28gIa9MzJ/X4t3F5o 2xwPmWLxIElPHHxNAUMyQ81ILuC/FqdzVjj2WErfwxDWlHkES+ThzDyIKxrm3FEAAGco /pAmZV6MdVi/JI0zI3hQpM4Ej42c+9iCBH5v0B44w/LiL8DFVqJdNI644EP1H2Y5VjdX zYnWP71KRARQ1eW7i+I7ozpT7BinOs84lYO1EbS3miMxw3MVT9RsZFVAtMtsDJ7z9jkQ IWYA== X-Gm-Message-State: AOAM532TVI3o7LrqnI0zraiPStBdIX1KLxTRL8bgcEgPjJc5egghdmKD 2XZQU3CXNjR744nwwxOL6Aej1eIY X-Google-Smtp-Source: ABdhPJyd6n7YZ2B7ihLhaQ4Fg+N3ToRvZDsyDBH9ElMHQwH700y6/iQ7IcXTxoKIkk5xTr90ZVLvdw== X-Received: by 2002:a5d:548c:: with SMTP id h12mr27575611wrv.120.1591134329959; Tue, 02 Jun 2020 14:45:29 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id a3sm218428wmb.7.2020.06.02.14.45.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Jun 2020 14:45:29 -0700 (PDT) Subject: Re: bug#41649: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode To: Brian Leung , Alan Mackenzie References: <20200602171221.19097.qmail@mail.muc.de> From: Dmitry Gutov Message-ID: Date: Wed, 3 Jun 2020 00:45:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 41649 Cc: 41649@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 02.06.2020 20:27, Brian Leung wrote: > I wasn't sure if js-beginning-of-defun was preferred here since it does > not seem to detect ES2015 arrow functions like what is used here, > whereas c-beginning-of-defun handles them fine outside of ReactJS cases: > if you try M-: js-beginning-of-defun on my React example, point moves > straight from the class declaration to the imports, which is not > desirable. Should I file a separate ticket for that? A separate ticked is probably better. The fix shouldn't be too hard, but there are a lot of "\\_) id 1jgZEu-0000Ii-O6 for submit@debbugs.gnu.org; Wed, 03 Jun 2020 15:39:52 -0400 Received: from colin.muc.de ([193.149.48.1]:50141 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jgZEs-0000IZ-CT for 41649@debbugs.gnu.org; Wed, 03 Jun 2020 15:39:50 -0400 Received: (qmail 69337 invoked by uid 3782); 3 Jun 2020 19:39:48 -0000 Received: from acm.muc.de (p4fe15dc1.dip0.t-ipconnect.de [79.225.93.193]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Wed, 03 Jun 2020 21:39:47 +0200 Received: (qmail 8538 invoked by uid 1000); 3 Jun 2020 19:39:46 -0000 Date: Wed, 3 Jun 2020 19:39:46 +0000 To: Dmitry Gutov Subject: Re: bug#41649: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode Message-ID: <20200603193946.GA8484@ACM> References: <20200602171221.19097.qmail@mail.muc.de> <0cbfd145-bdb2-4e1c-2f81-864c55894bc2@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0cbfd145-bdb2-4e1c-2f81-864c55894bc2@yandex.ru> X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41649 Cc: Brian Leung , 41649@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Dmitry. On Wed, Jun 03, 2020 at 00:43:32 +0300, Dmitry Gutov wrote: > Hi Alan, > On 02.06.2020 20:12, Alan Mackenzie wrote: > > The problem seems to stem from the top-level function #'js-mode. Early > > on, it invokes > > (c-init-language-vars js-mode) > > , which initialises the CC Mode language variables to (mostly) their > > Java Mode values. js-mode continues by overwriting the local value of > > quite a few of these variables, including beginning-of-defun-function. > > js-mode then invokes > > (c-init-language-vars js-mode) > > a second time, which initialises the language variables again, in > > particular, those variables which just got a local value, including > > beginning-of-defun-function. > > Daniel, what is going on, here? Is this just a simple coding error, > > where the second c-init-language-vars should have been removed at some > stage? > I agree that the second call should be removed. Thanks. > You might be amused to look at the commit 4ad6c932a82, though, and see > who the author is. :-) Indeed I am. ;-) It was me. Funny thing is, I had absolutely no recollection of ever modifying js.el, that is until I checked over my notes from last November. So, yes, It was just a simple coding error. Apologies to Daniel for the nuisance. I'll get a patch onto the list as soon as I've got the time and energy to check it over carefully. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 03 16:08:20 2020 Received: (at 41649) by debbugs.gnu.org; 3 Jun 2020 20:08:20 +0000 Received: from localhost ([127.0.0.1]:44601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgZgS-000106-2W for submit@debbugs.gnu.org; Wed, 03 Jun 2020 16:08:20 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:34826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgZgQ-0000zs-8R for 41649@debbugs.gnu.org; Wed, 03 Jun 2020 16:08:18 -0400 Received: by mail-wm1-f46.google.com with SMTP id q25so3405987wmj.0 for <41649@debbugs.gnu.org>; Wed, 03 Jun 2020 13:08:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=SssPegA8yaBZBO21CIjH53Z/B0E4L0XA6jbYkFoldSs=; b=W/Ycqp4H7Mfg93dJrk+3V+l6pUQDhGnfcfNwAXC6H5KCrA7hSBFt4FVsRC4/whE2+r s686eHJGPpSNHGUyKkqTuU7349wEojV6ZeJXzxOh7VBDq6OWQ7RWx6pZ7zny6QmXZVGa QthlNLnQPCvJMYMsmq2270XDaT2sPIm9N5Y1Rsmp5CRhx7O3478wluNfiUUlZWiIutD3 nBeLgUqc2S8FKj3d+Diwe7suEHm4xle9RSsjIIhlNconRKUxNpJihtlFyUzCRNutyNDf VOb0E1Yg8PAKp47qKE5I+tTOkDQsKg0xb22mXYGRIcKqHkQKxZRXzvfZjM05+lKOcmTS 8C2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SssPegA8yaBZBO21CIjH53Z/B0E4L0XA6jbYkFoldSs=; b=KSBjaWwy6iBM9lD7qJ22m+Pk++co5e2LMCnqzEmOXGkdE4Ad1aIlTr+ILiZePR3iav zS9F9lU0NGY7v448MfQ6XjrMFEpZ2+c5kmhLbeD111oYv6T2MCznYgcHhYvk9sIIaxnt 7EOYwH+dMsy42FfKg5cD4NRQHZ7zcA29CGFTeO0uR2Oq9JOGeLquf1NMoHic4FL86w95 UXZBahEZqi+vIpdqsZCsICOGXy4ZUAn0TCuGA9b+710ErljUXT4oJry/5J/KUZawp+rY +bQNOdZJWJwHONs9sfExD2KbTvOIV9H3pb1+Zm6Th8wUcDbwwglbxYMqoYB9kwQJtQSD cIcA== X-Gm-Message-State: AOAM533NgjPhsdJCI6XtTdGUBg01zn77Ode/csnTbNjtpV07MHN41cI/ eCDRR7sosgZoG2EIZrSi+/QrxeDI X-Google-Smtp-Source: ABdhPJziPInnwdbGAaa1F7BDI+gpToJ3570YE6Eg+pMpYPPkVBPZIGud1xpo+eIVWoj9oic135j28g== X-Received: by 2002:a1c:e914:: with SMTP id q20mr677744wmc.145.1591214892163; Wed, 03 Jun 2020 13:08:12 -0700 (PDT) Received: from [192.168.0.3] ([66.205.73.129]) by smtp.googlemail.com with ESMTPSA id i74sm4832641wri.49.2020.06.03.13.08.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 03 Jun 2020 13:08:10 -0700 (PDT) Subject: Re: bug#41649: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode To: Alan Mackenzie References: <20200602171221.19097.qmail@mail.muc.de> <0cbfd145-bdb2-4e1c-2f81-864c55894bc2@yandex.ru> <20200603193946.GA8484@ACM> From: Dmitry Gutov Message-ID: <954aaf5b-ebd9-d6f2-0104-6db8a3cf7083@yandex.ru> Date: Wed, 3 Jun 2020 23:08:09 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200603193946.GA8484@ACM> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 41649 Cc: Brian Leung , 41649@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 03.06.2020 22:39, Alan Mackenzie wrote: > I'll get a patch onto the list as soon as I've got the time and energy to > check it over carefully. Thanks! From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 04 12:23:44 2020 Received: (at 41649) by debbugs.gnu.org; 4 Jun 2020 16:23:44 +0000 Received: from localhost ([127.0.0.1]:47363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgsee-0001wN-H8 for submit@debbugs.gnu.org; Thu, 04 Jun 2020 12:23:44 -0400 Received: from colin.muc.de ([193.149.48.1]:56543 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jgsec-0001wB-2h for 41649@debbugs.gnu.org; Thu, 04 Jun 2020 12:23:43 -0400 Received: (qmail 86780 invoked by uid 3782); 4 Jun 2020 16:23:40 -0000 Received: from acm.muc.de (p4fe15c7a.dip0.t-ipconnect.de [79.225.92.122]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Thu, 04 Jun 2020 18:23:39 +0200 Received: (qmail 17303 invoked by uid 1000); 4 Jun 2020 16:23:40 -0000 Date: Thu, 4 Jun 2020 16:23:40 +0000 To: Dmitry Gutov , Brian Leung Subject: Re: bug#41649: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode Message-ID: <20200604162340.GA17119@ACM> References: <20200602171221.19097.qmail@mail.muc.de> <0cbfd145-bdb2-4e1c-2f81-864c55894bc2@yandex.ru> <20200603193946.GA8484@ACM> <954aaf5b-ebd9-d6f2-0104-6db8a3cf7083@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <954aaf5b-ebd9-d6f2-0104-6db8a3cf7083@yandex.ru> X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41649 Cc: 41649@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Dmitry and Brian. On Wed, Jun 03, 2020 at 23:08:09 +0300, Dmitry Gutov wrote: > On 03.06.2020 22:39, Alan Mackenzie wrote: > > I'll get a patch onto the list as soon as I've got the time and energy to > > check it over carefully. > Thanks! Would you please try out the following patch, which ought to fix the problem the patch should fix. Seeing as how it corrects the value of a number of configuration variables (around fifteen), there might be further incidental benefits. diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index 5ec3e94275..04b449ecd2 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -4591,7 +4591,6 @@ js-mode (setq imenu-create-index-function #'js--imenu-create-index) ;; for filling, pretend we're cc-mode - (c-init-language-vars js-mode) (setq-local comment-line-break-function #'c-indent-new-comment-line) (setq-local comment-multi-line t) (setq-local electric-indent-chars It might well be too late to include this patch in the Emacs 27 release. If you're reading this, Eli, what do you say? -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 04 12:26:46 2020 Received: (at 41649) by debbugs.gnu.org; 4 Jun 2020 16:26:46 +0000 Received: from localhost ([127.0.0.1]:47367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgshZ-00021J-U8 for submit@debbugs.gnu.org; Thu, 04 Jun 2020 12:26:46 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:44881) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgshX-000216-TS for 41649@debbugs.gnu.org; Thu, 04 Jun 2020 12:26:44 -0400 Received: by mail-wr1-f53.google.com with SMTP id y17so6788782wrn.11 for <41649@debbugs.gnu.org>; Thu, 04 Jun 2020 09:26:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OGGV3jtBVOR3VRpQ6cUkrTtGfD3xKw4n32pdml4q4uU=; b=aIj43XgnQUKToDBM/TkV8rQGZvZS9i6WKlEi2St3H4i5ocew2cRUv4O5k05NFL+jJC NgGK5WEe2Gv+bv8gTR8MGIydchr/l0IHdzl065ZNzeU+dpX3aViR3YB/F+tLefiCKZ1Y jRvG85cqxwpKapEgnCzmrAvxgLAC4bNhFCLjHryT0FWj0tYiRZlOpXx9+04DYpwr8GI6 iRsqBO3lFcbyoUlXpHe5Bl1I7OFNkxM4Cv8YppnKywBMXqIIwmi9hoRIoHjir1d1GIkV NGOQQnQgnwm2QELG6IdlHM8Enux7ajCg159XgngTgIniTEsjVNqaeNneLjNEbcS+INxL Javg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OGGV3jtBVOR3VRpQ6cUkrTtGfD3xKw4n32pdml4q4uU=; b=jSogCdLz2revsCcLkJr7qXpGHV2Ci/k6xYBFJXETbYFlRsSFOmvNgZc+sE9KYdn5oY uoQtAxpKDwml2ynSddy/mRZ0AP252EWRB6RrW02abj7N+BcQNu5IU/NaL6OMCf4OBGMC xAnr1KS6SG37GZselbIeEUSAiZsE5o8JKdKnsqfTOajA5Hi4iFGt700ve5f1hMrC5uCr df5T45IRp+KHfEWam/SKHRUI1gGsbvSxR4ULpyCqSYxVwi1SxFXN69ueTEe7PdSLWT8l p1hb4BAPqiJXCM2inVJS+AdKqXUun54e/dDurr4b9zz35i0tY760zxIe2/0d+qdcFLkb U6qA== X-Gm-Message-State: AOAM530uxQvv34o9D6w1JZ4u/jSoqtrlNO/b1qz+dOOiLovUDi/eFXnR G1VVRY+02ZcFrVn0o9PEYrccrXI8 X-Google-Smtp-Source: ABdhPJxyTWv97uAAC0+zuGEZdEh7DLX+zXAFwqv1EBCtavAvEAJKnsLEXgjWMuMJzc2jNIRU8NHrug== X-Received: by 2002:adf:9286:: with SMTP id 6mr5228172wrn.361.1591287997594; Thu, 04 Jun 2020 09:26:37 -0700 (PDT) Received: from [192.168.0.86] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id t129sm8715211wmf.41.2020.06.04.09.26.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Jun 2020 09:26:36 -0700 (PDT) Subject: Re: bug#41649: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode To: Alan Mackenzie , Brian Leung References: <20200602171221.19097.qmail@mail.muc.de> <0cbfd145-bdb2-4e1c-2f81-864c55894bc2@yandex.ru> <20200603193946.GA8484@ACM> <954aaf5b-ebd9-d6f2-0104-6db8a3cf7083@yandex.ru> <20200604162340.GA17119@ACM> From: Dmitry Gutov Message-ID: <7248fff6-0a69-7641-6667-b68726d5d471@yandex.ru> Date: Thu, 4 Jun 2020 19:26:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200604162340.GA17119@ACM> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 41649 Cc: 41649@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) On 04.06.2020 19:23, Alan Mackenzie wrote: > Would you please try out the following patch, which ought to fix the > problem the patch should fix. I tried it a few days ago, and it indeed seemed to fix the reported scenario. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 04 12:41:19 2020 Received: (at 41649) by debbugs.gnu.org; 4 Jun 2020 16:41:19 +0000 Received: from localhost ([127.0.0.1]:47376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgsvf-0002OI-FD for submit@debbugs.gnu.org; Thu, 04 Jun 2020 12:41:19 -0400 Received: from mail-ej1-f51.google.com ([209.85.218.51]:36584) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgsvc-0002Ny-I5 for 41649@debbugs.gnu.org; Thu, 04 Jun 2020 12:41:17 -0400 Received: by mail-ej1-f51.google.com with SMTP id z5so6846387ejb.3 for <41649@debbugs.gnu.org>; Thu, 04 Jun 2020 09:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8gVPBioCovIgtXHSlF9IxF6aJXtHYE5HGfU+Jvt3t0k=; b=cABTtYoUmj0vuguWpjjFE6NscTZ8sxd8sc5YX4MQzXBbReyDwFyNtIQc1MUmfGC9Ou I2Dgexdp86cz55VoSCsQa8yjjrNDvhyy86BSz1Y4VRTdseTXMn/EHADrCnEuIVlIPa9+ BJ+NnpnYwY2w2FRLc5awIiZEepUKRvekFSoq9DVFKuM3g+CpYt2CyGAtCmt541ez+O1D +D+VSNmi/Je3U//aaKoxZhXqkv6vGaevhbqK+l7AN/mbYUsImY9L9krSoaux4a0e9pAE QXPgcVDAmokrlWQ6RCAL+pV6OfgiCgZz/pJo1x0qbKdhKEZx9UlLsPObIeTymQfkl7Hy KoKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8gVPBioCovIgtXHSlF9IxF6aJXtHYE5HGfU+Jvt3t0k=; b=DHrGYGo6wEJFw8OrSQaRyiKkE9k4FCg1TSwNX0AMEZ/FQcccMARRTc8cgS02GpTp+l lEeIbXwvhw8p3ElLd9jdqjNILsBB3pWetgQRcXaQYZ1Dsuk9Ho+h3/lYr69lCqlEkWJN LQlWfQEiKaTx25VhX3n5kxeRCEsWGjVKl+2m0zENVCcLDh7EI/WESEiOAAtvlCCQ/6wR 2sow0wbMD3GLDI+GZUQ3yfPDLJOkAAmDT1fXdNHTE7ZOG/cO46sXp0jREwl7MEvcTBzp NWICtLYRkTtXX0CK0dvp1rylpbHO5smLbwJMk2wbBv6FomXHuUwzwkhPnZzUO6duKvQh EP8A== X-Gm-Message-State: AOAM5335ELxBvoNLxD30vzh9MD3zD97Djqs32UgYp5mBzyv+mx7OLy5z eKMJYpmMe4M6spRXyvZA9+QGS25pMO7OtKYOdKU= X-Google-Smtp-Source: ABdhPJzFA82LHXcOqMBA+ztLZjQrcDCRkCzZ8wi5yasDLburqz4ZvSFGK7seUIgol7XvtjM290iEIHn7Tlh71UjLiEo= X-Received: by 2002:a17:906:4b18:: with SMTP id y24mr4602783eju.366.1591288870681; Thu, 04 Jun 2020 09:41:10 -0700 (PDT) MIME-Version: 1.0 References: <20200602171221.19097.qmail@mail.muc.de> <0cbfd145-bdb2-4e1c-2f81-864c55894bc2@yandex.ru> <20200603193946.GA8484@ACM> <954aaf5b-ebd9-d6f2-0104-6db8a3cf7083@yandex.ru> <20200604162340.GA17119@ACM> <7248fff6-0a69-7641-6667-b68726d5d471@yandex.ru> In-Reply-To: <7248fff6-0a69-7641-6667-b68726d5d471@yandex.ru> From: Brian Leung Date: Thu, 4 Jun 2020 09:40:34 -0700 Message-ID: Subject: Re: bug#41649: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode To: Dmitry Gutov Content-Type: multipart/alternative; boundary="000000000000df42a705a744cf74" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 41649 Cc: Alan Mackenzie , 41649@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000df42a705a744cf74 Content-Type: text/plain; charset="UTF-8" It works for me also. Thanks. On Thu, Jun 4, 2020 at 9:26 AM Dmitry Gutov wrote: > On 04.06.2020 19:23, Alan Mackenzie wrote: > > Would you please try out the following patch, which ought to fix the > > problem the patch should fix. > > I tried it a few days ago, and it indeed seemed to fix the reported > scenario. > --000000000000df42a705a744cf74 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
It works for me also. Thanks.

On Thu, Jun 4, 2020 at 9:= 26 AM Dmitry Gutov <dgutov@yandex.ru= > wrote:
= On 04.06.2020 19:23, Alan Mackenzie wrote:
> Would you please try out the following patch, which ought to fix the > problem the patch should fix.

I tried it a few days ago, and it indeed seemed to fix the reported
scenario.
--000000000000df42a705a744cf74-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 07 11:23:31 2020 Received: (at 41649-done) by debbugs.gnu.org; 7 Jun 2020 15:23:31 +0000 Received: from localhost ([127.0.0.1]:54633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhx90-0006ya-Q1 for submit@debbugs.gnu.org; Sun, 07 Jun 2020 11:23:30 -0400 Received: from colin.muc.de ([193.149.48.1]:28114 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1jhx8y-0006yJ-OL for 41649-done@debbugs.gnu.org; Sun, 07 Jun 2020 11:23:29 -0400 Received: (qmail 22795 invoked by uid 3782); 7 Jun 2020 15:23:22 -0000 Received: from acm.muc.de (p2e5d5bab.dip0.t-ipconnect.de [46.93.91.171]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sun, 07 Jun 2020 17:23:21 +0200 Received: (qmail 6244 invoked by uid 1000); 7 Jun 2020 15:23:20 -0000 Date: Sun, 7 Jun 2020 15:23:20 +0000 To: Brian Leung Subject: Re: bug#41649: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode Message-ID: <20200607152320.GA6212@ACM> References: <20200602171221.19097.qmail@mail.muc.de> <0cbfd145-bdb2-4e1c-2f81-864c55894bc2@yandex.ru> <20200603193946.GA8484@ACM> <954aaf5b-ebd9-d6f2-0104-6db8a3cf7083@yandex.ru> <20200604162340.GA17119@ACM> <7248fff6-0a69-7641-6667-b68726d5d471@yandex.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41649-done Cc: 41649-done@debbugs.gnu.org, Dmitry Gutov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hello, Brian and Dmitry. On Thu, Jun 04, 2020 at 09:40:34 -0700, Brian Leung wrote: > It works for me also. Thanks. > On Thu, Jun 4, 2020 at 9:26 AM Dmitry Gutov wrote: > > On 04.06.2020 19:23, Alan Mackenzie wrote: > > > Would you please try out the following patch, which ought to fix the > > > problem the patch should fix. > > I tried it a few days ago, and it indeed seemed to fix the reported > > scenario. OK, that's good, thanks. Thinking about it, and considering how many js-mode settings get amended by this patch, it is fairly complicated. So, it really is too late for the emacs-27 branch. So I've committed the patch to master. I'm closing the bug with this post. -- Alan Mackenzie (Nuremberg, Germany). From unknown Sat Aug 16 18:43:52 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 06 Jul 2020 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator