all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Tobias C. Rittweiler" <tcr@freebits.de>
Cc: 2499@emacsbugs.donarmstrong.com
Subject: bug#2499: 23.0.91; syntax-ppss / beginning-of-defun not saving match data
Date: Sat, 28 Feb 2009 17:09:29 -0500	[thread overview]
Message-ID: <jwvvdquxljl.fsf-monnier+emacsbugreports@gnu.org> (raw)
In-Reply-To: <87tz6efqkx.fsf@freebits.de> (Tobias C. Rittweiler's message of "Sat, 28 Feb 2009 17:56:14 +0100")

>> >   (i) `beginning-of-defun' is allowed to not save match data. If so,
>> >       please document it.
>> 99.9% of the functions are allowed to not save match data.  
> Oh, I didn't know that! I thought the policy was the other way
> around. (Perhaps 34.6, The Match Data, should make this policy more
> explicit. If so, and you say so, I'll prepare a patch.)

Patch welcome.

>> We do not bother to document it.  We should document the functions
>> that are not allowed to do it, OTOH.
> I think it's still worth to think about making `syntax-ppss' saving the
> match data as this function may easily be implicitly invoked by
> something deep down.

Basically any function that does a non-trivial amount of work should be
expected to affect the match-data.  I.e. it's the responsability of the
match-data user to make sure she reads the match-data soon after the
regexp match took place, rather than responsability of all other
functions to preserve the match-data.


        Stefan






  reply	other threads:[~2009-02-28 22:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-27 15:42 bug#2499: 23.0.91; syntax-ppss / beginning-of-defun not saving match data tcr
2009-02-28  4:50 ` Stefan Monnier
2009-02-28 16:56   ` Tobias C. Rittweiler
2009-02-28 22:09     ` Stefan Monnier [this message]
2009-03-03 20:50       ` Tobias C. Rittweiler
2011-07-03 18:45         ` Lars Magne Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=jwvvdquxljl.fsf-monnier+emacsbugreports@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=2499@emacsbugs.donarmstrong.com \
    --cc=tcr@freebits.de \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.