diff src/event-stream.c @ 367:a4f53d9b3154 r21-1-13

Import from CVS: tag r21-1-13
author cvs
date Mon, 13 Aug 2007 11:01:07 +0200
parents c9fe270a4101
children cc15677e0335
line wrap: on
line diff
--- a/src/event-stream.c	Mon Aug 13 11:00:13 2007 +0200
+++ b/src/event-stream.c	Mon Aug 13 11:01:07 2007 +0200
@@ -2510,7 +2510,7 @@
    All of these routines install timeouts, so we clear the installed
    timeout as well.
 
-   Note: It's very easy to break the desired behaviours of these
+   Note: It's very easy to break the desired behaviors of these
    3 routines.  If you make any changes to anything in this area, run
    the regression tests at the bottom of the file.  -- dmoore */
 
@@ -3497,7 +3497,7 @@
   if (menubar_widget
       && CONSP (Vmenu_accelerator_modifiers))
     {
-      Lisp_Object fake;
+      Lisp_Object fake = Qnil;
       Lisp_Object last = Qnil;
       struct gcpro gcpro1;
       Lisp_Object matchp;
@@ -3878,7 +3878,6 @@
   Lisp_Object val = Qnil;
   int nwanted;
   int start, nkeys, i, j;
-  GCPRO1 (val);
 
   if (NILP (number))
     nwanted = recent_keys_ring_size;
@@ -3918,6 +3917,7 @@
   else
     nwanted = nkeys;
 
+  GCPRO1 (val);
   val = make_vector (nwanted, Qnil);
 
   for (i = 0, j = start; i < nkeys; i++)
@@ -3951,7 +3951,6 @@
   Lisp_Object new_vector = Qnil;
   int i, j, nkeys, start, min;
   struct gcpro gcpro1;
-  GCPRO1 (new_vector);
 
   CHECK_INT (size);
   if (XINT (size) <= 0)
@@ -3959,11 +3958,13 @@
   if (XINT (size) == recent_keys_ring_size)
     return size;
 
+  GCPRO1 (new_vector);
   new_vector = make_vector (XINT (size), Qnil);
 
   if (NILP (Vrecent_keys_ring))
     {
       Vrecent_keys_ring = new_vector;
+      UNGCPRO;
       return size;
     }