[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#54195: master 15a76160bb: Don't throw errors while propertizing in s
From: |
Lars Ingebrigtsen |
Subject: |
bug#54195: master 15a76160bb: Don't throw errors while propertizing in sgml-mode |
Date: |
Tue, 01 Mar 2022 16:15:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Stefan Monnier <monnier@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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#54195: master 15a76160bb: Don't throw errors while propertizing in sgml-mode,
Lars Ingebrigtsen <=