diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2009-08-18 15:12:14 +0000 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2009-08-18 15:12:14 +0000 |
commit | ba6f7d8640de1f191bee882de5bc029883a901b5 (patch) | |
tree | f4833b78f3cb6c6d29929c6f8dc0c59a84e37453 /lisp/net | |
parent | 997797ae1bf94406e779c9cdd4bec6c2f1d5b2f4 (diff) | |
download | emacs-ba6f7d8640de1f191bee882de5bc029883a901b5.tar.gz emacs-ba6f7d8640de1f191bee882de5bc029883a901b5.tar.bz2 emacs-ba6f7d8640de1f191bee882de5bc029883a901b5.zip |
* net/dbus.el (dbus-init-bus): Declare. Apply it for the :system
and :session buses.
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/dbus.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 894d7c63787..c1222a66f66 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -34,12 +34,22 @@ ;; option "--without-dbus". Declare used subroutines and variables. (declare-function dbus-call-method "dbusbind.c") (declare-function dbus-call-method-asynchronously "dbusbind.c") +(declare-function dbus-init-bus "dbusbind.c") (declare-function dbus-method-return-internal "dbusbind.c") (declare-function dbus-method-error-internal "dbusbind.c") (declare-function dbus-register-signal "dbusbind.c") (defvar dbus-debug) (defvar dbus-registered-functions-table) +;; Initialize :system and :session buses. This adds their file +;; descriptors to input_wait_mask, in order to detect incoming +;; messages immediately. +;; We must avoid to call the function twice for a bus, because the +;; DBusWatch will be removed then. +(when (and (featurep 'dbusbind) (not (featurep 'dbus))) + (dbus-init-bus :system) + (dbus-init-bus :session)) + ;; Pacify byte compiler. (eval-when-compile (require 'cl)) |