unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: Saving match data
Date: Sat, 08 Oct 2016 09:25:41 +0300	[thread overview]
Message-ID: <83a8eficgq.fsf@gnu.org> (raw)
In-Reply-To: <87y41zv66z.fsf@web.de> (message from Michael Heerdegen on Sat, 08 Oct 2016 06:02:44 +0200)

> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: monnier@iro.umontreal.ca,  emacs-devel@gnu.org
> Date: Sat, 08 Oct 2016 06:02:44 +0200
> 
> Well, what currently looks like (using some fantasy function names)
> 
> #+begin_src emacs-lisp
> (progn
>   (search-forward "test")
>   (save-match-data
>     (do-this)
>     (maybe-change-match-data-here)
>     (do-that))
>   (use-the-match-data))
> #+end_src
> 
> could become something like
> 
> #+begin_src emacs-lisp
> (with-match-data data
>      (search-forward "test")
>    (do-this)
>    (maybe-change-match-data-here)
>    (do-that)
>    (use-match-data data
>       (use-the-match-data)))
> #+end_src

This just replaces one macro with 2 different ones, and doesn't make
the code more elegant or readable, or bring any new benefits, does it?
Or am I missing something?

> Honestly, I don't really want to propose to change things, if either in
> this direction, or at all... as long as we don't invest too much time to
> consolidate what we have now (like ensuring tons of function to not
> change match data).

I don't see why we would need to do anything with tons of functions.
The stuff works, doesn't it?



  reply	other threads:[~2016-10-08  6:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28 14:01 Saving match data Philipp Stephani
2016-09-28 15:03 ` Eli Zaretskii
2016-09-28 16:11 ` Stefan Monnier
2016-09-28 16:49   ` Michael Heerdegen
2016-09-28 18:25     ` Stefan Monnier
2016-09-28 18:37       ` Michael Heerdegen
2016-09-28 20:00     ` Eli Zaretskii
2016-09-28 20:15       ` Michael Heerdegen
2016-09-28 20:22         ` Eli Zaretskii
2016-09-28 20:42           ` Michael Heerdegen
2016-09-28 20:58             ` Lars Ingebrigtsen
2016-09-29  2:36             ` Eli Zaretskii
2016-10-08  4:02               ` Michael Heerdegen
2016-10-08  6:25                 ` Eli Zaretskii [this message]
2016-10-08 15:06                 ` Stefan Monnier
2017-06-16 19:24   ` Philipp Stephani
2017-06-16 19:53     ` Stefan Monnier
2017-06-16 22:16       ` Philipp Stephani
2017-06-17 13:53         ` Stefan Monnier
2017-06-17 14:02           ` Philipp Stephani
2017-10-08 15:56             ` Philipp Stephani
2017-10-08 16:01       ` Philipp Stephani
2016-09-28 17:00 ` Marcin Borkowski
2016-09-29  9:29   ` Uwe Brauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a8eficgq.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).