From: Michael Albinus Date: Sun, 28 Feb 2010 10:27:39 +0000 (+0100) Subject: * net/dbus.el (dbus-introspect, dbus-get-property) X-Git-Tag: emacs-pretest-23.1.94~25^2~14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d4b067837ead8978610ca2684fb7bc4e32b35bc1;p=emacs.git * net/dbus.el (dbus-introspect, dbus-get-property) (dbus-set-property, dbus-get-all-properties): Use `dbus-call-method' when noninteractive. (Bug#5645) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1c91ebe4831..cd06672cfb9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-02-28 Michael Albinus + + * 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 * textmodes/reftex-toc.el (reftex-toc-promote-prepare): diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 146cff0544e..5635640cd4c 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -573,7 +573,8 @@ the introspection data, is a string in XML format." ;; 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 @@ valid D-Bus value, or `nil' if there is no PROPERTY." (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 @@ been set successful, the result is VALUE. Otherwise, `nil' is 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 @@ name of the property, and its value. If there are no properties, ;; "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)