From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Strange results from lwarn + match-string Date: Tue, 19 Feb 2008 22:39:48 -0500 Message-ID: References: <47BB1DEF.6080407@gmail.com> <47BB4708.4060000@gmail.com> <47BB56A9.9080303@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1203478843 31372 80.91.229.12 (20 Feb 2008 03:40:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Feb 2008 03:40:43 +0000 (UTC) Cc: Andreas Schwab , Emacs Devel To: "Lennart Borgman \(gmail\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 20 04:41:07 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JRfpT-0000Gb-Eu for ged-emacs-devel@m.gmane.org; Wed, 20 Feb 2008 04:41:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRfoy-0003Gp-9J for ged-emacs-devel@m.gmane.org; Tue, 19 Feb 2008 22:40:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JRfoG-000332-TE for emacs-devel@gnu.org; Tue, 19 Feb 2008 22:39:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JRfoE-000323-PL for emacs-devel@gnu.org; Tue, 19 Feb 2008 22:39:52 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JRfoE-00031x-Gy for emacs-devel@gnu.org; Tue, 19 Feb 2008 22:39:50 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JRfoE-0005dj-6L for emacs-devel@gnu.org; Tue, 19 Feb 2008 22:39:50 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAKIvu0fO+J2cdGdsb2JhbACQUQEwgSGdb4EB X-IronPort-AV: E=Sophos;i="4.25,379,1199682000"; d="scan'208";a="14737649" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 19 Feb 2008 22:39:48 -0500 Original-Received: from pastel.home ([206.248.157.156]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id AFH78548; Tue, 19 Feb 2008 22:39:48 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 750D7801A; Tue, 19 Feb 2008 22:39:48 -0500 (EST) In-Reply-To: <47BB56A9.9080303@gmail.com> (Lennart Borgman's message of "Tue, 19 Feb 2008 23:22:33 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:89641 Archived-At: >>> (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