Subject: Re: bug#64459: 30.0.50; Edebug can't instrument certain syntax-propertize-rules forms

From: Eli Zaretskii <[email-masked]>
Date: Wed, 05 Jul 2023 16:35:01 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: Philipp Stephani <[email-masked]>,  [email-masked]
> Date: Wed, 05 Jul 2023 08:43:15 -0400
> 
> >> > > diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
> >> > > index d610fa005cc..002a24af18b 100644
> >> > > --- a/lisp/emacs-lisp/syntax.el
> >> > > +++ b/lisp/emacs-lisp/syntax.el
> >> > > @@ -249,11 +249,12 @@ syntax-propertize-rules
> >> > >  Note: There may be at most nine back-references in the REGEXPs of
> >> > >  all RULES in total."
> >> > >    (declare (debug (&rest &or symbolp    ;FIXME: edebug this eval step.
> >> > > -                         (form &rest
> >> > > -                               (numberp
> >> > > -                                [&or stringp ;FIXME: Use &wrap
> >> > > -                                     ("prog1" [&or stringp def-form] def-body)
> >> > > -                                     def-form])))))
> >> > > +                         (def-form
> >> > > +                          &rest
> >> > > +                          (numberp
> >> > > +                           [&or stringp ;FIXME: Use &wrap
> >> > > +                                ("prog1" [&or stringp form] def-body)
> >> > > +                                form])))))
> >> > >    (let ((newrules nil))
> >> > >      (while rules
> >> > >        (if (symbolp (car rules))
> >> >
> >> > No, this one introduces a regression.  Try that one:
> >> >
> >> 
> >> Yeah, that works at least in the cases I've tested. Thanks!
> >
> > Stefan, this is for master, right?
> 
> Yes: if you want it for `emacs-29`, I do think it's perfectly safe (it
> just replaces the one `form` with `def-form`), but I don't see any
> urgency here.

I don't see any urgency, either, since this problem existed at least
since Emacs 28.

So please install on master, and thanks.