]> git.eshelyaron.com Git - emacs.git/commitdiff
(x_get_local_selection, x_handle_selection_request): Use assignment, not
authorKarl Heuer <kwzh@gnu.org>
Fri, 25 Mar 1994 00:42:33 +0000 (00:42 +0000)
committerKarl Heuer <kwzh@gnu.org>
Fri, 25 Mar 1994 00:42:33 +0000 (00:42 +0000)
initialization.

src/xselect.c

index c2da7b0655b6284449fd3e69ed60d670202f9a7c..c56402e182f5827541ff9a46d631124486dc94aa 100644 (file)
@@ -323,9 +323,11 @@ x_get_local_selection (selection_symbol, target_type)
   else if (CONSP (target_type)
           && XCONS (target_type)->car == QMULTIPLE)
     {
-      Lisp_Object pairs = XCONS (target_type)->cdr;
-      int size = XVECTOR (pairs)->size;
+      Lisp_Object pairs;
+      int size;
       int i;
+      pairs = XCONS (target_type)->cdr;
+      size = XVECTOR (pairs)->size;
       /* If the target is MULTIPLE, then target_type looks like
          (MULTIPLE . [[SELECTION1 TARGET1] [SELECTION2 TARGET2] ... ])
         We modify the second element of each pair in the vector and
@@ -333,7 +335,8 @@ x_get_local_selection (selection_symbol, target_type)
        */
       for (i = 0; i < size; i++)
        {
-         Lisp_Object pair = XVECTOR (pairs)->contents [i];
+         Lisp_Object pair;
+         pair = XVECTOR (pairs)->contents [i];
          XVECTOR (pair)->contents [1]
            = x_get_local_selection (XVECTOR (pair)->contents [0],
                                     XVECTOR (pair)->contents [1]);
@@ -594,14 +597,19 @@ x_handle_selection_request (event)
      struct input_event *event;
 {
   struct gcpro gcpro1, gcpro2, gcpro3;
-  Lisp_Object local_selection_data = Qnil;
+  Lisp_Object local_selection_data;
   Lisp_Object selection_symbol;
-  Lisp_Object target_symbol = Qnil;
-  Lisp_Object converted_selection = Qnil;
+  Lisp_Object target_symbol;
+  Lisp_Object converted_selection;
   Time local_selection_time;
-  Lisp_Object successful_p = Qnil;
+  Lisp_Object successful_p;
   int count;
 
+  local_selection_data = Qnil;
+  target_symbol = Qnil;
+  converted_selection = Qnil;
+  successful_p = Qnil;
+
   GCPRO3 (local_selection_data, converted_selection, target_symbol);
 
   selection_symbol = x_atom_to_symbol (SELECTION_EVENT_DISPLAY (event),
@@ -676,7 +684,8 @@ x_handle_selection_request (event)
 
   /* Let random lisp code notice that the selection has been asked for.  */
   {
-    Lisp_Object rest = Vx_sent_selection_hooks;
+    Lisp_Object rest;
+    rest = Vx_sent_selection_hooks;
     if (!EQ (rest, Qunbound))
       for (; CONSP (rest); rest = Fcdr (rest))
        call3 (Fcar (rest), selection_symbol, target_symbol, successful_p);