unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 54195@debbugs.gnu.org
Subject: bug#54195: master 15a76160bb: Don't throw errors while propertizing in sgml-mode
Date: Tue, 01 Mar 2022 16:15:38 +0100	[thread overview]
Message-ID: <87lextn1ph.fsf@gnus.org> (raw)
In-Reply-To: <jwvh78jxdxe.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 28 Feb 2022 09:44:01 -0500")

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





      reply	other threads:[~2022-03-01 15:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <164604066920.6274.17125818957525062942@vcs2.savannah.gnu.org>
     [not found] ` <20220228093109.81A17C0DA33@vcs2.savannah.gnu.org>
2022-02-28 14:44   ` bug#54195: master 15a76160bb: Don't throw errors while propertizing in sgml-mode Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-01 15:15     ` Lars Ingebrigtsen [this message]

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=87lextn1ph.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=54195@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).