Merge from emacs-24; up to 2014-06-03T06:51:18Z!eliz@gnu.org
[bpt/emacs.git] / src / dbusbind.c
index 1c386f0..8997e01 100644 (file)
@@ -42,7 +42,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 \f
 /* Subroutines.  */
-static Lisp_Object Qdbus_init_bus;
+static Lisp_Object Qdbus__init_bus;
 static Lisp_Object Qdbus_get_unique_name;
 static Lisp_Object Qdbus_message_internal;
 
@@ -142,10 +142,7 @@ static bool xd_in_read_queued_messages = 0;
   } while (0)
 
 #else /* !DBUS_DEBUG */
-# if __STDC_VERSION__ < 199901
-#  define XD_DEBUG_MESSAGE (void) /* Pre-C99 compilers cannot debug.  */
-# else
-#  define XD_DEBUG_MESSAGE(...)                                                \
+# define XD_DEBUG_MESSAGE(...)                                         \
   do {                                                                 \
     if (!NILP (Vdbus_debug))                                           \
       {                                                                        \
@@ -154,7 +151,6 @@ static bool xd_in_read_queued_messages = 0;
        message ("%s: %s", __func__, s);                                \
       }                                                                        \
   } while (0)
-# endif
 # define XD_DEBUG_VALID_LISP_OBJECT_P(object)
 #endif
 
@@ -1094,7 +1090,7 @@ xd_close_bus (Lisp_Object bus)
   if (NILP (val))
     return;
 
-  busobj = CDR_SAFE(val);
+  busobj = CDR_SAFE (val);
   if (NILP (busobj)) {
     xd_registered_buses = Fdelete (val, xd_registered_buses);
     return;
@@ -1121,9 +1117,12 @@ xd_close_bus (Lisp_Object bus)
   return;
 }
 
-DEFUN ("dbus-init-bus", Fdbus_init_bus, Sdbus_init_bus, 1, 2, 0,
+DEFUN ("dbus--init-bus", Fdbus__init_bus, Sdbus__init_bus, 1, 2, 0,
        doc: /* Establish the connection to D-Bus BUS.
 
+This function is dbus internal.  You almost certainly want to use
+`dbus-init-bus'.
+
 BUS can be either the symbol `:system' or the symbol `:session', or it
 can be a string denoting the address of the corresponding bus.  For
 the system and session buses, this function is called when loading
@@ -1742,8 +1741,8 @@ void
 syms_of_dbusbind (void)
 {
 
-  DEFSYM (Qdbus_init_bus, "dbus-init-bus");
-  defsubr (&Sdbus_init_bus);
+  DEFSYM (Qdbus__init_bus, "dbus--init-bus");
+  defsubr (&Sdbus__init_bus);
 
   DEFSYM (Qdbus_get_unique_name, "dbus-get-unique-name");
   defsubr (&Sdbus_get_unique_name);