]> code.delx.au - gnu-emacs/blobdiff - src/xselect.c
Remove redundant include of unistd.h, stdlib.h. Use
[gnu-emacs] / src / xselect.c
index bf1690e909faea69936623e41794ebb7e3fd6c14..5fd2c862cb72c887691f8d5ba944291549412322 100644 (file)
@@ -425,6 +425,9 @@ x_get_local_selection (selection_symbol, target_type, local_request)
 
       CHECK_SYMBOL (target_type);
       handler_fn = Fcdr (Fassq (target_type, Vselection_converter_alist));
+      /* gcpro is not needed here since nothing but HANDLER_FN
+        is live, and that ought to be a symbol.  */
+
       if (!NILP (handler_fn))
        value = call3 (handler_fn,
                       selection_symbol, (local_request ? Qnil : target_type),
@@ -837,8 +840,6 @@ x_handle_selection_request (event)
 
  DONE:
 
-  UNGCPRO;
-
   /* Let random lisp code notice that the selection has been asked for.  */
   {
     Lisp_Object rest;
@@ -847,6 +848,8 @@ x_handle_selection_request (event)
       for (; CONSP (rest); rest = Fcdr (rest))
        call3 (Fcar (rest), selection_symbol, target_symbol, successful_p);
   }
+
+  UNGCPRO;
 }
 \f
 /* Handle a SelectionClear event EVENT, which indicates that some