From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@gmail.com>
Cc: Andreas Schwab <schwab@suse.de>, Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Strange results from lwarn + match-string
Date: Tue, 19 Feb 2008 22:39:48 -0500 [thread overview]
Message-ID: <jwvtzk4guul.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <47BB56A9.9080303@gmail.com> (Lennart Borgman's message of "Tue, 19 Feb 2008 23:22:33 +0100")
>>> (lwarn t :warning "0: %s" (match-string-no-properties 0))
>>> (lwarn t :warning "1: %s" (match-string-no-properties 1))
>>> (lwarn t :warning "2: %s" (match-string-no-properties 2))
>>> (lwarn t :warning "3: %s" (match-string-no-properties 3))
>>
>> Since you don't know for a fact that lwarn is among the few functions
>> that do not affect match-data, you need to call all
>> 4 `match-string-no-properties' before you call the 4 `lwarn'.
> Hm. It cured the problem, but that was really a surprise.
There are very few functions which guarantee that they preserve
match-data, so if there's the slightest doubt, assume that match-data
will be destroyed,
Stefan
prev parent reply other threads:[~2008-02-20 3:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 18:20 Strange results from lwarn + match-string Lennart Borgman (gmail)
2008-02-19 20:51 ` Andreas Schwab
2008-02-19 21:15 ` Lennart Borgman (gmail)
2008-02-19 22:08 ` Stefan Monnier
2008-02-19 22:22 ` Lennart Borgman (gmail)
2008-02-20 3:39 ` Stefan Monnier [this message]
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=jwvtzk4guul.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=lennart.borgman@gmail.com \
--cc=schwab@suse.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.