[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#41445: 26.3; Query-replace triggers "match data clobbered by..."
From: |
Eli Zaretskii |
Subject: |
bug#41445: 26.3; Query-replace triggers "match data clobbered by..." |
Date: |
Sat, 23 May 2020 15:28:42 +0300 |
> From: Mattias Engdegård <mattiase@acm.org>
> Date: Sat, 23 May 2020 13:36:37 +0200
> Cc: ture@turepalsson.se, 41445@debbugs.gnu.org
>
> > My line of reasoning was that only the callers of ENCODE_FILE and
> > DECODE_FILE will not expect the match-data to be clobbered. Code that
> > calls ucs-normalize-region directly may or may not be bothered by the
> > clobbering, so we should leave that to the caller.
> >
> > The advantage of not doing this unconditionally is that we don't
> > unnecessarily punishing callers that don't need match-data to be
> > saved.
>
> For callers of the ucs-normalize- functions, correctness should come first;
> their names, semantics or descriptions do not lead the user to suspect them
> of clobbering the match data. It is an implementation leakage which can be
> quite unexpected, as is witnessed by this bug.
I thought we had some advice to Lisp programs not to assume that
match-data will be preserved, but maybe I'm misremembering. Stefan,
do you remember something along these lines?
Anyway, if you feel strongly about doing this on the lowest level, I
won't fight.
- bug#41445: 26.3; Query-replace triggers "match data clobbered by...", Ture Pålsson, 2020/05/22
- bug#41445: 26.3; Query-replace triggers "match data clobbered by...", Mattias Engdegård, 2020/05/22
- bug#41445: 26.3; Query-replace triggers "match data clobbered by...", Eli Zaretskii, 2020/05/22
- bug#41445: 26.3; Query-replace triggers "match data clobbered by...", Mattias Engdegård, 2020/05/23
- bug#41445: 26.3; Query-replace triggers "match data clobbered by...",
Eli Zaretskii <=
- bug#41445: 26.3; Query-replace triggers "match data clobbered by...", Philipp Stephani, 2020/05/23
- bug#41445: 26.3; Query-replace triggers "match data clobbered by...", Eli Zaretskii, 2020/05/23
- bug#41445: 26.3; Query-replace triggers "match data clobbered by...", Mattias Engdegård, 2020/05/23
- bug#41445: 26.3; Query-replace triggers "match data clobbered by...", Stefan Monnier, 2020/05/23
- bug#41445: 26.3; Query-replace triggers "match data clobbered by...", Drew Adams, 2020/05/23
- bug#41445: 26.3; Query-replace triggers "match data clobbered by...", Mattias Engdegård, 2020/05/27
- bug#41445: 26.3; Query-replace triggers "match data clobbered by...", Eli Zaretskii, 2020/05/27