emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (require 'cus-load) clobbers match-data


From: David Kastrup
Subject: Re: (require 'cus-load) clobbers match-data
Date: Sun, 14 Feb 2010 08:01:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux)

Geoff Gole <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]