From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#41649: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode Date: Wed, 3 Jun 2020 19:39:46 +0000 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 Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="30368"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Brian Leung , 41649@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 03 21:40:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jgZFD-0007nk-4W for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Jun 2020 21:40:11 +0200 Original-Received: from localhost ([::1]:58894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jgZFB-00021h-Ls for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Jun 2020 15:40:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36216) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jgZF4-00021X-5j for bug-gnu-emacs@gnu.org; Wed, 03 Jun 2020 15:40:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jgZF3-0000fy-Sn for bug-gnu-emacs@gnu.org; Wed, 03 Jun 2020 15:40:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jgZF3-0000JB-Pd for bug-gnu-emacs@gnu.org; Wed, 03 Jun 2020 15:40:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Jun 2020 19:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41649 X-GNU-PR-Package: emacs Original-Received: via spool by 41649-submit@debbugs.gnu.org id=B41649.15912131931166 (code B ref 41649); Wed, 03 Jun 2020 19:40:01 +0000 Original-Received: (at 41649) by debbugs.gnu.org; 3 Jun 2020 19:39:53 +0000 Original-Received: from localhost ([127.0.0.1]:44575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jgZEu-0000Ii-O6 for submit@debbugs.gnu.org; Wed, 03 Jun 2020 15:39:52 -0400 Original-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 Original-Received: (qmail 69337 invoked by uid 3782); 3 Jun 2020 19:39:48 -0000 Original-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 Original-Received: (qmail 8538 invoked by uid 1000); 3 Jun 2020 19:39:46 -0000 Content-Disposition: inline In-Reply-To: <0cbfd145-bdb2-4e1c-2f81-864c55894bc2@yandex.ru> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:181474 Archived-At: 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).