unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: (require 'cus-load) clobbers match-data
Date: Sun, 14 Feb 2010 08:01:52 +0100	[thread overview]
Message-ID: <87zl3cgv1b.fsf@lola.goethe.zz> (raw)
In-Reply-To: f5bc73231002132113l3ea89c4dx8f3ad340272662c1@mail.gmail.com

Geoff Gole <geoffgole@gmail.com> writes:

> While trying to puzzle out bug 5533
> <http://debbugs.gnu.org/cgi/bugreport.cgi?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





  reply	other threads:[~2010-02-14  7:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-14  5:13 (require 'cus-load) clobbers match-data Geoff Gole
2010-02-14  7:01 ` David Kastrup [this message]
2010-02-14  7:49   ` Geoff Gole
2010-02-14  8:00     ` David Kastrup
2010-02-14  8:33       ` Geoff Gole
2010-02-16 20:13 ` Glenn Morris
2010-02-16 20:25   ` Davis Herring
2010-02-16 21:11     ` Andreas Schwab

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87zl3cgv1b.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).