changeset 107255:6ea11661a516

* net/dbus.el (dbus-introspect, dbus-get-property) (dbus-set-property, dbus-get-all-properties): Use `dbus-call-method' when noninteractive. (Bug#5645)
author Michael Albinus <albinus@detlef>
date Sun, 28 Feb 2010 11:27:39 +0100
parents f5443a6af811
children 122dff72a8ee 68e6039c08f1
files lisp/ChangeLog lisp/net/dbus.el
diffstat 2 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Feb 28 11:05:21 2010 +0100
+++ b/lisp/ChangeLog	Sun Feb 28 11:27:39 2010 +0100
@@ -1,3 +1,9 @@
+2010-02-28  Michael Albinus  <michael.albinus@gmx.de>
+
+	* net/dbus.el (dbus-introspect, dbus-get-property)
+	(dbus-set-property, dbus-get-all-properties): Use
+	`dbus-call-method' when noninteractive.  (Bug#5645)
+
 2010-02-28  Chong Yidong  <cyd@stupidchicken.com>
 
 	* textmodes/reftex-toc.el (reftex-toc-promote-prepare):
--- a/lisp/net/dbus.el	Sun Feb 28 11:05:21 2010 +0100
+++ b/lisp/net/dbus.el	Sun Feb 28 11:27:39 2010 +0100
@@ -573,7 +573,8 @@
   ;; is used, because the handler can be registered in our Emacs
   ;; instance; caller an callee would block each other.
   (dbus-ignore-errors
-    (dbus-call-method-non-blocking
+    (funcall
+     (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking)
      bus service path dbus-interface-introspectable "Introspect")))
 
 (defun dbus-introspect-xml (bus service path)
@@ -831,7 +832,8 @@
   (dbus-ignore-errors
     ;; "Get" returns a variant, so we must use the `car'.
     (car
-     (dbus-call-method-non-blocking
+     (funcall
+      (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking)
       bus service path dbus-interface-properties
       "Get" :timeout 500 interface property))))
 
@@ -842,7 +844,8 @@
 returned."
   (dbus-ignore-errors
     ;; "Set" requires a variant.
-    (dbus-call-method-non-blocking
+    (funcall
+     (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking)
      bus service path dbus-interface-properties
      "Set" :timeout 500 interface property (list :variant value))
     ;; Return VALUE.
@@ -857,7 +860,10 @@
     ;; "GetAll" returns "a{sv}".
     (let (result)
       (dolist (dict
-	       (dbus-call-method-non-blocking
+	       (funcall
+		(if noninteractive
+		    'dbus-call-method
+		  'dbus-call-method-non-blocking)
 		bus service path dbus-interface-properties
 		"GetAll" :timeout 500 interface)
 	       result)