/* Session management module for systems which understand the X Session
management protocol.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ Copyright (C) 2002-2011
Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include "termopts.h"
#include "xterm.h"
-/* Avoid "differ in sign" warnings */
-#define SSDATA(x) ((char *) SDATA (x))
-
/* This is the event used when SAVE_SESSION_EVENT occurs. */
static struct input_event emacs_event;
static char *emacs_program;
-/* The client session id for this session as a lisp object. */
-
-Lisp_Object Vx_session_id;
-
-/* The id we had the previous session. This is only available if we
- have been started by the session manager with SMID_OPT. */
-
-Lisp_Object Vx_session_previous_id;
-
/* The option we tell the session manager to start Emacs with when
restarting Emacs. The client_id is appended. */
props[props_idx]->vals[2].value = NOSPLASH_OPT;
cwd = get_current_dir_name ();
- if (cwd)
+ if (cwd)
{
chdir_opt = xmalloc (strlen (CHDIR_OPT) + strlen (cwd) + 1);
strcpy (chdir_opt, CHDIR_OPT);
-1, -1, 1, 1,
CopyFromParent, CopyFromParent, CopyFromParent);
- class_hints.res_name = (char *) SDATA (Vx_resource_name);
- class_hints.res_class = (char *) SDATA (Vx_resource_class);
+ class_hints.res_name = SSDATA (Vx_resource_name);
+ class_hints.res_class = SSDATA (Vx_resource_class);
XSetClassHint (dpyinfo->display, w, &class_hints);
XStoreName (dpyinfo->display, w, class_hints.res_name);
SmcCloseConnection (smc_conn, 0, 0);
ice_connection_closed ();
}
-
+
return Qnil;
}
-
+
\f
/***********************************************************************
void
syms_of_xsmfns (void)
{
- DEFVAR_LISP ("x-session-id", &Vx_session_id,
+ DEFVAR_LISP ("x-session-id", Vx_session_id,
doc: /* The session id Emacs got from the session manager for this session.
Changing the value does not change the session id used by Emacs.
The value is nil if no session manager is running.
`emacs-session-save' and `emacs-session-restore'." */);
Vx_session_id = Qnil;
- DEFVAR_LISP ("x-session-previous-id", &Vx_session_previous_id,
+ DEFVAR_LISP ("x-session-previous-id", Vx_session_previous_id,
doc: /* The previous session id Emacs got from session manager.
If Emacs is running on a window system that has a session manager, the
session manager gives Emacs a session id. It is feasible for Emacs Lisp
}
#endif /* HAVE_X_SM */
-