rm not definition
[bpt/emacs.git] / src / dbusbind.c
index 460733c..e8b0771 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_1;
+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
 
@@ -950,7 +946,7 @@ xd_retrieve_arg (int dtype, DBusMessageIter *iter)
            dbus_message_iter_next (&subiter);
          }
        XD_DEBUG_MESSAGE ("%c %s", dtype, XD_OBJECT_TO_STRING (result));
-       RETURN_UNGCPRO (Fnreverse (result));
+       return Fnreverse (result);
       }
 
     default:
@@ -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,11 +1117,11 @@ xd_close_bus (Lisp_Object bus)
   return;
 }
 
-DEFUN ("dbus-init-bus-1", Fdbus_init_bus_1, Sdbus_init_bus_1, 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.
+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
@@ -1538,7 +1534,7 @@ usage: (dbus-message-internal &rest REST)  */)
   dbus_message_unref (dmessage);
 
   /* Return the result.  */
-  RETURN_UNGCPRO (result);
+  return result;
 }
 
 /* Read one queued incoming message of the D-Bus BUS.
@@ -1744,22 +1740,16 @@ xd_read_queued_messages (int fd, void *data)
 void
 syms_of_dbusbind (void)
 {
+#include "dbusbind.x"
 
-  DEFSYM (Qdbus_init_bus_1, "dbus-init-bus-1");
-  defsubr (&Sdbus_init_bus_1);
-
+  DEFSYM (Qdbus__init_bus, "dbus--init-bus");
   DEFSYM (Qdbus_get_unique_name, "dbus-get-unique-name");
-  defsubr (&Sdbus_get_unique_name);
-
   DEFSYM (Qdbus_message_internal, "dbus-message-internal");
-  defsubr (&Sdbus_message_internal);
-
   DEFSYM (Qdbus_error, "dbus-error");
   Fput (Qdbus_error, Qerror_conditions,
        list2 (Qdbus_error, Qerror));
   Fput (Qdbus_error, Qerror_message,
        build_pure_c_string ("D-Bus error"));
-
   DEFSYM (QCdbus_system_bus, ":system");
   DEFSYM (QCdbus_session_bus, ":session");
   DEFSYM (QCdbus_timeout, ":timeout");