unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: 3863@emacsbugs.donarmstrong.com, Kevin Ryde <user42@zip.com.au>,
	Chong Yidong <cyd@stupidchicken.com>
Subject: bug#3863: 23.1.50; possible save-match-data in copyright.el
Date: Thu, 16 Jul 2009 23:23:29 -0400	[thread overview]
Message-ID: <jwv1vogc82f.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <e01d8a50907161142i2deb1a34ma5141d5720db8e74@mail.gmail.com> (Lennart Borgman's message of "Thu, 16 Jul 2009 20:42:42 +0200")

> I don't think I understand, but it sounds like this is a reason why
> y-or-n-p should save match-data...

Here we go again:

All functions destroy the match-data except for a few rare exceptions,
which are simple functions doing little work.

> Is there any reason not to let y-or-n-p save match data?

If you think y-or-n-p deserves saving the match-data then pretty much
all other functions deserve that change as well.  And since
save-match-data is somewhat costly, it would imply a singificant
performance impact.


        Stefan


PS: Worse yet: during y-or-n-p, the buffer might be completely changed
by the code run asynchronously, so the "saved" match data may not even
have any meaning any more.





  reply	other threads:[~2009-07-17  3:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-16 14:33 bug#3863: 23.1.50; possible save-match-data in copyright.el Chong Yidong
2009-07-16 17:24 ` Stefan Monnier
2009-07-16 18:42   ` Lennart Borgman
2009-07-17  3:23     ` Stefan Monnier [this message]
2009-07-17  4:00       ` Lennart Borgman
2009-07-17  7:57       ` martin rudalics
2009-07-16 18:54   ` Chong Yidong
2009-07-17  3:24     ` Stefan Monnier
2009-07-17  3:54       ` Chong Yidong
2009-07-17 16:00         ` Stefan Monnier
2009-08-06  0:56 ` Kevin Ryde
  -- strict thread matches above, loose matches on Subject: below --
2009-07-16  0:05 Kevin Ryde
2009-07-16  2:01 ` Stefan Monnier

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=jwv1vogc82f.fsf-monnier+emacsbugreports@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=3863@emacsbugs.donarmstrong.com \
    --cc=cyd@stupidchicken.com \
    --cc=lennart.borgman@gmail.com \
    --cc=user42@zip.com.au \
    /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).