aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2009-08-19 07:15:28 +0000
committerMichael Albinus2009-08-19 07:15:28 +0000
commit720c7cd6a93566a5758f76e6b4dc80aef97cb275 (patch)
treedfc37eda0fca48310671bf7f3fe78812951f80b0
parent03a74b84f850e08f7d981d357ff03135b72f0d18 (diff)
downloademacs-720c7cd6a93566a5758f76e6b4dc80aef97cb275.tar.gz
emacs-720c7cd6a93566a5758f76e6b4dc80aef97cb275.zip
* net/dbus.el (top): Apply `dbus-init-bus' for the :session bus
only if it is running already.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/dbus.el17
2 files changed, 13 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 08c56531d96..f511078e522 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12009-08-19 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/dbus.el (top): Apply `dbus-init-bus' only if the session bus
4 is running already.
5
12009-08-19 Stefan Monnier <monnier@iro.umontreal.ca> 62009-08-19 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * subr.el (listify-key-sequence-1): Use normal syntax since those 8 * subr.el (listify-key-sequence-1): Use normal syntax since those
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index c1222a66f66..273d531ed35 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -41,15 +41,6 @@
41(defvar dbus-debug) 41(defvar dbus-debug)
42(defvar dbus-registered-functions-table) 42(defvar dbus-registered-functions-table)
43 43
44;; Initialize :system and :session buses. This adds their file
45;; descriptors to input_wait_mask, in order to detect incoming
46;; messages immediately.
47;; We must avoid to call the function twice for a bus, because the
48;; DBusWatch will be removed then.
49(when (and (featurep 'dbusbind) (not (featurep 'dbus)))
50 (dbus-init-bus :system)
51 (dbus-init-bus :session))
52
53;; Pacify byte compiler. 44;; Pacify byte compiler.
54(eval-when-compile 45(eval-when-compile
55 (require 'cl)) 46 (require 'cl))
@@ -841,6 +832,14 @@ name of the property, and its value. If there are no properties,
841 (cons property (dbus-get-property bus service path interface property)) 832 (cons property (dbus-get-property bus service path interface property))
842 'append))))) 833 'append)))))
843 834
835;; Initialize :system and :session buses. This adds their file
836;; descriptors to input_wait_mask, in order to detect incoming
837;; messages immediately.
838(dbus-ignore-errors
839 (when (getenv "DBUS_SESSION_BUS_ADDRESS")
840 (dbus-init-bus :system)
841 (dbus-init-bus :session)))
842
844(provide 'dbus) 843(provide 'dbus)
845 844
846;; arch-tag: a47caf84-9162-4811-90cc-5d388e37b9bd 845;; arch-tag: a47caf84-9162-4811-90cc-5d388e37b9bd