From: "Stefan Monnier" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu>
Subject: Re: Why doesn't forward-paragraph save-match-data?
Date: 28 Jul 2003 16:23:41 -0400 [thread overview]
Message-ID: <5l7k62tn76.fsf@rum.cs.yale.edu> (raw)
In-Reply-To: 0ngpfb.5e.ln@acm.acm
> (save-excursion
> (forward-paragraph -1)
> (< (point) (match-beginning 0)))
> It seems to me that that comparison ALWAYS evaluates to nil.
> I feel that either forward-paragraph should have a save-match-data round
> it, or its doc string should mention that the caller might have to use
> save-match-data.
If anything, what is missing a some more documentation in `match-beginning'
explaining that the match data is "ephemeral" and can be changed by most
functions other than very basic ones that obviously don't use regexps (like
`car'). It's generally a lot easier to fix the very few places where
this ephemerality is a problem than to add `save-match-data'
around everything.
Stefan
parent reply other threads:[~2003-07-28 20:23 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <0ngpfb.5e.ln@acm.acm>]
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=5l7k62tn76.fsf@rum.cs.yale.edu \
--to=monnier+gnu.emacs.help/news/@flint.cs.yale.edu \
/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.