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

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 05 Sep 2021 11:45:50 +0200

Eli Zaretskii <[email-masked]> writes:

> FWIW, I don't share the above view.  We bind variables to affect
> behavior of functions all over the place, and that is perfectly okay,
> IMO.

This one leads to really hard to debug problems, though.

>> -@defun looking-at regexp
>> +@defun looking-at regexp &optional inhibit-save
>                                       ^^^^^^^^^^^^
> A typo?

Yup.  I changed the name of these parameters five times while writing
the patch.

>> +(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.

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