bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51926: 29.0.50; Narrow to defun fails with Javascript async function


From: Matthias Meulien
Subject: bug#51926: 29.0.50; Narrow to defun fails with Javascript async functions
Date: Fri, 19 Nov 2021 23:22:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Yup; I can reproduce this in Emacs 29, too.  I've poked at it now, and
> it's surprisingly difficult to fix this, due to the way these functions
> are constructed.  But I think I've got it working now in Emacs 29.

I pulled last HEAD of master which includes:

   6cad3dc75e..: Lars Ingebrigtsen 2021-11-18 Fix `narrow-to-defun' in
   "async function" in js-mode

Unfortunately it has improved but it doesn't always work as
expected. With a buffer with following content:

async function test() {
    // cursor here
}

it now works when cursor is on the first line ("async function test...")
AND not after the opening brace. After that brace, on first line or
second line, it fails...
-- 
Matthias





reply via email to

[Prev in Thread] Current Thread [Next in Thread]