GNU bug report logs - #54195
27.1; electric-pair-mode assertion failure in HTML+JS mode

Previous Next

Package: emacs;

Reported by: Jeff Chase <jeff.chase <at> gmail.com>

Date: Mon, 28 Feb 2022 08:16:07 UTC

Severity: normal

Found in version 27.1

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 54195 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 54195 <at> debbugs.gnu.org
Subject: Re: master 15a76160bb: Don't throw errors while propertizing in
 sgml-mode
Date: Tue, 01 Mar 2022 16:15:38 +0100
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> The PPSS really shouldn't have a negative value here.  The problem is
> that when we do as in the recipe (which does not require
> `electric-pair-mode` to reproduce), mhtml calls `sgml-syntax-propertize`
> on the `</script>` tag and the `syntax-ppss` call returns the state of
> the JS parsing at the end of the JS code rather than the state of the
> SGML parsing at the beginning of the tag.
>
> IOW it's a bug in the interaction between `mhtml` and `syntax-ppss`.

I assumed that people didn't normally get any erroring-out here because
these functions are normally called from font-locking, which catches
most errors.  When electric-pair-mode is used, the syntax functions are
called via a different code path that doesn't catch errors, so I thought
it'd make most sense to not call `error' from the code at all.

But yes, the parsing won't be correct.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 141 days ago.

Previous Next


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