GNU bug report logs - #41649
27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode

Previous Next

Package: emacs;

Reported by: Brian Leung <bkleung89 <at> gmail.com>

Date: Mon, 1 Jun 2020 18:01:01 UTC

Severity: normal

Found in version 27.0.91

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: Brian Leung <bkleung89 <at> gmail.com>, 41649 <at> debbugs.gnu.org
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
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).




This bug report was last modified 5 years and 42 days ago.

Previous Next


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