From: Brian Leung <bkleung89@gmail.com>
To: 41649@debbugs.gnu.org
Subject: bug#41649: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode
Date: Mon, 1 Jun 2020 10:59:50 -0700 [thread overview]
Message-ID: <CAAc=MEzE0CU5-VOVSaLHFO9oGQgS1BiQXjX_jArUdYDAWgUeZg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1256 bytes --]
With a file App.js that looks like:
import * as React from "react";
import { render } from "react-dom";
const App = () => {
return (
<div>
<h1 id="abc">hello</h1>
<SearchParams />
</div>
);
};
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)
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)
[-- Attachment #2: Type: text/html, Size: 1549 bytes --]
next reply other threads:[~2020-06-01 17:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 17:59 Brian Leung [this message]
[not found] ` <mailman.928.1591034465.2541.bug-gnu-emacs@gnu.org>
2020-06-02 17:12 ` bug#41649: 27.0.91; beginning-of-defun doesn't work inside React markup in js-jsx-mode Alan Mackenzie
2020-06-02 17:27 ` Brian Leung
2020-06-02 21:45 ` Dmitry Gutov
2020-06-02 21:43 ` Dmitry Gutov
2020-06-03 19:39 ` Alan Mackenzie
2020-06-03 20:08 ` Dmitry Gutov
2020-06-04 16:23 ` Alan Mackenzie
2020-06-04 16:26 ` Dmitry Gutov
2020-06-04 16:40 ` Brian Leung
2020-06-07 15:23 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAc=MEzE0CU5-VOVSaLHFO9oGQgS1BiQXjX_jArUdYDAWgUeZg@mail.gmail.com' \
--to=bkleung89@gmail.com \
--cc=41649@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).