* lisp/progmodes/hideif.el: Use lexical-binding. Fix up cl-lib usage.
[bpt/emacs.git] / src / xsmfns.c
index 55daec7..81b0126 100644 (file)
@@ -1,7 +1,7 @@
 /* Session management module for systems which understand the X Session
    management protocol.
 
-Copyright (C) 2002-201 Free Software Foundation, Inc.
+Copyright (C) 2002-2014 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -29,14 +29,12 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <unistd.h>
 #include <sys/param.h>
 #include <stdio.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "systime.h"
 #include "sysselect.h"
 #include "frame.h"
 #include "termhooks.h"
-#include "termopts.h"
 #include "xterm.h"
 #include "process.h"
 #include "keyboard.h"
@@ -97,7 +95,7 @@ ice_connection_closed (void)
    open to a session manager, just return.  */
 
 static void
-x_session_check_input (int fd, void *data, int for_read)
+x_session_check_input (int fd, void *data)
 {
   int ret;
 
@@ -109,8 +107,7 @@ x_session_check_input (int fd, void *data, int for_read)
      will be called.  */
   emacs_event.kind = NO_EVENT;
 
-  ret = IceProcessMessages (SmcGetIceConnection (smc_conn),
-                            (IceReplyWaitInfo *)0, (Bool *)0);
+  ret = IceProcessMessages (SmcGetIceConnection (smc_conn), 0, 0);
   if (ret != IceProcessMessagesSuccess)
     {
       /* Either IO error or Connection closed.  */
@@ -398,7 +395,7 @@ x_session_initialize (struct x_display_info *dpyinfo)
 {
 #define SM_ERRORSTRING_LEN 512
   char errorstring[SM_ERRORSTRING_LEN];
-  charprevious_id = NULL;
+  char *previous_id = NULL;
   SmcCallbacks callbacks;
   ptrdiff_t name_len = 0;
 
@@ -462,7 +459,7 @@ x_session_initialize (struct x_display_info *dpyinfo)
       Vx_session_id = build_string (client_id);
 
 #ifdef USE_GTK
-      /* GTK creats a leader window by itself, but we need to tell
+      /* GTK creates a leader window by itself, but we need to tell
          it about our client_id.  */
       gdk_x11_set_sm_client_id (client_id);
 #else
@@ -516,9 +513,11 @@ Do not call this function yourself. */)
          prevent.  Fix this in next version.  */
       Fkill_emacs (Qnil);
 
+#if 0
       /* This will not be reached, but we want kill-emacs-hook to be run.  */
       SmcCloseConnection (smc_conn, 0, 0);
       ice_connection_closed ();
+#endif
     }
 
   return Qnil;