diff options
| author | Richard M. Stallman | 1999-04-09 19:21:52 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1999-04-09 19:21:52 +0000 |
| commit | f87740dccbc3b62d5a588dba5cdf5eff2a00d2f0 (patch) | |
| tree | 7b3a784786d823982109022d5910259474986ec1 /src/eval.c | |
| parent | abc9d9597cc0b221bef0abcec1f66d4e4337cb45 (diff) | |
| download | emacs-f87740dccbc3b62d5a588dba5cdf5eff2a00d2f0.tar.gz emacs-f87740dccbc3b62d5a588dba5cdf5eff2a00d2f0.zip | |
(do_autoload): Preserve match data.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/eval.c b/src/eval.c index 6d9c0ed809c..b9a89374236 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1649,12 +1649,15 @@ do_autoload (fundef, funname) | |||
| 1649 | CHECK_SYMBOL (funname, 0); | 1649 | CHECK_SYMBOL (funname, 0); |
| 1650 | GCPRO3 (fun, funname, fundef); | 1650 | GCPRO3 (fun, funname, fundef); |
| 1651 | 1651 | ||
| 1652 | /* Value saved here is to be restored into Vautoload_queue */ | 1652 | /* Preserve the match data. */ |
| 1653 | record_unwind_protect (Fset_match_data, Fmatch_data (Qnil, Qnil)); | ||
| 1654 | |||
| 1655 | /* Value saved here is to be restored into Vautoload_queue. */ | ||
| 1653 | record_unwind_protect (un_autoload, Vautoload_queue); | 1656 | record_unwind_protect (un_autoload, Vautoload_queue); |
| 1654 | Vautoload_queue = Qt; | 1657 | Vautoload_queue = Qt; |
| 1655 | Fload (Fcar (Fcdr (fundef)), Qnil, noninteractive ? Qt : Qnil, Qnil, Qt); | 1658 | Fload (Fcar (Fcdr (fundef)), Qnil, noninteractive ? Qt : Qnil, Qnil, Qt); |
| 1656 | 1659 | ||
| 1657 | /* Save the old autoloads, in case we ever do an unload. */ | 1660 | /* Save the old autoloads, in case we ever do an unload. */ |
| 1658 | queue = Vautoload_queue; | 1661 | queue = Vautoload_queue; |
| 1659 | while (CONSP (queue)) | 1662 | while (CONSP (queue)) |
| 1660 | { | 1663 | { |
| @@ -1664,7 +1667,7 @@ do_autoload (fundef, funname) | |||
| 1664 | 1667 | ||
| 1665 | /* Note: This test is subtle. The cdr of an autoload-queue entry | 1668 | /* Note: This test is subtle. The cdr of an autoload-queue entry |
| 1666 | may be an atom if the autoload entry was generated by a defalias | 1669 | may be an atom if the autoload entry was generated by a defalias |
| 1667 | or fset. */ | 1670 | or fset. */ |
| 1668 | if (CONSP (second)) | 1671 | if (CONSP (second)) |
| 1669 | Fput (first, Qautoload, (Fcdr (second))); | 1672 | Fput (first, Qautoload, (Fcdr (second))); |
| 1670 | 1673 | ||