Subject: bug#33414: 27.0.50; inhibit-changing-match-data can be t in syntax-propertize functions, breaking backtrace and looking-at

From: Eli Zaretskii <[email-masked]>
Date: Sun, 05 Sep 2021 12:55:00 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Sun, 05 Sep 2021 11:45:50 +0200
> 
> >> +(make-obsolete-variable 'inhibit-changing-match-data nil "28.1")
> >
> > Really? why obsolete it?
> 
> Because it's not used (and shouldn't be used).  `save-match-data' is the
> proper way to achieve this in normal code.

It's a variable we had since Emacs 23.  The proposed replacements are
only useful if your Lisp program actually calls the APIs you propose
to extend, but it won't do if you call higher-level APIs.

We can recommend not to use the variable where the extended APIs could
be used instead with the new optional argument, but I don't think we
should obsolete it, let alone remove it in the future.