From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: (require 'cus-load) clobbers match-data Date: Sun, 14 Feb 2010 08:01:52 +0100 Organization: Organization?!? Message-ID: <87zl3cgv1b.fsf@lola.goethe.zz> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1266130951 21877 80.91.229.12 (14 Feb 2010 07:02:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Feb 2010 07:02:31 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 14 08:02:29 2010 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.69) (envelope-from ) id 1NgYUu-0004gu-1z for ged-emacs-devel@m.gmane.org; Sun, 14 Feb 2010 08:02:28 +0100 Original-Received: from localhost ([127.0.0.1]:41160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NgYUt-0000fg-BP for ged-emacs-devel@m.gmane.org; Sun, 14 Feb 2010 02:02:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NgYUk-0000fb-CQ for emacs-devel@gnu.org; Sun, 14 Feb 2010 02:02:18 -0500 Original-Received: from [140.186.70.92] (port=48168 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NgYUj-0000fT-2N for emacs-devel@gnu.org; Sun, 14 Feb 2010 02:02:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NgYUg-00052a-EL for emacs-devel@gnu.org; Sun, 14 Feb 2010 02:02:16 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:41957) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NgYUg-00052W-8m for emacs-devel@gnu.org; Sun, 14 Feb 2010 02:02:14 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NgYUe-0004Yq-Kf for emacs-devel@gnu.org; Sun, 14 Feb 2010 08:02:12 +0100 Original-Received: from p5b2c377a.dip.t-dialin.net ([91.44.55.122]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Feb 2010 08:02:12 +0100 Original-Received: from dak by p5b2c377a.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 14 Feb 2010 08:02:12 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 26 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: p5b2c377a.dip.t-dialin.net X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux) Cancel-Lock: sha1:JFBQ9LjacM9cd6Sq3/18GCO4mIE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:121111 Archived-At: Geoff Gole writes: > While trying to puzzle out bug 5533 > , I've found that > (require 'cus-load) will stomp on match data if the file is not > already loaded: > > emacs -Q > (let ((md (match-data))) > (require 'cus-load) > (equal md (match-data))) > => t > > This is what causes the bug, but I can't figure out why it is > happening. cus-load.el is just a big list of (put ...) forms. Why is > it stomping on the match data? > > Anyway, if anybody knows how to stop it doing that, that would fix bug > 5533. Maybe require should save and restore the match data itself? Maybe. Things like hack-local-variables and similar affect match data. Everything that can autoload in some manner should save match data, I guess. -- David Kastrup