[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving match data

From: Eli Zaretskii
Subject: Re: Saving match data
Date: Thu, 29 Sep 2016 05:36:08 +0300

> From: Michael Heerdegen <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Wed, 28 Sep 2016 22:42:36 +0200
> Eli Zaretskii <address@hidden> writes:
> > > `save-match-data' is the thing I would like to avoid: instead of an
> > > implicit state that is altered as side effect, I want to make uses
> > > of match data explicit e.g. by using a variable.
> >
> > Why? what would that gain us?
> Not having the need to protect match data to be lost, and not having to
> care about which functions may change the match data, and which can be
> guaranteed to not change match data.  That would be irrelevant.  You
> would bind the match data to a variable directly when it is produced,
> and refer to it later by that variable name.  That would be more
> transparent, and spare us to invest either a large amount of work, or
> make Emacs slower.

Maybe I misunderstand the proposal, because it sounds very similar to
what we have.  Could you perhaps show an example using the current and
the proposed technique, so that the differences are clear?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]