diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-04-26 03:01:56 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-04-26 03:01:56 +0000 |
commit | dc9b69a8372896d4915aa67444b69b8b6e9da969 (patch) | |
tree | f489370c3f98f3bca00a122abe4edd7ff36d9973 /src/editfns.c | |
parent | a5e8e087d81481e10a311b767526d74a1291dd05 (diff) | |
download | emacs-dc9b69a8372896d4915aa67444b69b8b6e9da969.tar.gz |
(save_excursion_restore): Add gcpros.
Diffstat (limited to 'src/editfns.c')
-rw-r--r-- | src/editfns.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/editfns.c b/src/editfns.c index 2bc6de784fc..8a6733fb5e3 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -267,9 +267,10 @@ save_excursion_save () Lisp_Object save_excursion_restore (info) - register Lisp_Object info; + Lisp_Object info; { - register Lisp_Object tem, tem1, omark, nmark; + Lisp_Object tem, tem1, omark, nmark; + struct gcpro gcpro1, gcpro2, gcpro3; tem = Fmarker_buffer (Fcar (info)); /* If buffer being returned to is now deleted, avoid error */ @@ -278,6 +279,10 @@ save_excursion_restore (info) /* In that case, Fmarker_buffer returns nil now. */ if (NILP (tem)) return Qnil; + + omark = nmark = Qnil; + GCPRO3 (info, omark, nmark); + Fset_buffer (tem); tem = Fcar (info); Fgoto_char (tem); @@ -313,6 +318,7 @@ save_excursion_restore (info) else if (! NILP (tem1)) call1 (Vrun_hooks, intern ("deactivate-mark-hook")); } + UNGCPRO; return Qnil; } |