changeset 15075:e8613675066c

(save_excursion_restore): Add gcpros.
author Richard M. Stallman <rms@gnu.org>
date Fri, 26 Apr 1996 03:01:56 +0000
parents 0a9219070022
children 5e9132ff1d88
files src/editfns.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Fri Apr 26 03:01:43 1996 +0000
+++ b/src/editfns.c	Fri Apr 26 03:01:56 1996 +0000
@@ -267,9 +267,10 @@
 
 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 @@
   /* 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 @@
       else if (! NILP (tem1))
 	call1 (Vrun_hooks, intern ("deactivate-mark-hook"));
     }
+  UNGCPRO;
   return Qnil;
 }