From 682cefaf0c2f61d8d83c3628ae3b0da880771dcf Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 13 Jun 2012 13:56:53 +0200 Subject: [PATCH] * net/dbus.el (dbus-call-method): Use timeout for `read-event'. Otherwise, it blocks in batch mode. --- lisp/ChangeLog | 5 +++++ lisp/net/dbus.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aa688799374..1e3908d487a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-06-13 Michael Albinus + + * net/dbus.el (dbus-call-method): Use timeout for `read-event'. + Otherwise, it blocks in batch mode. + 2012-06-13 Juanma Barranquero * help-mode.el (bookmark-make-record-default): Declare. diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index c83651b41b5..7d6dcf37a01 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -269,7 +269,7 @@ object is returned instead of a list containing this single Lisp object. ;; default 25". Events which are not from D-Bus must be restored. (with-timeout ((if timeout (/ timeout 1000.0) 25)) (while (eq (gethash key dbus-return-values-table :ignore) :ignore) - (let ((event (let (unread-command-events) (read-event)))) + (let ((event (let (unread-command-events) (read-event nil nil 0.1)))) (when (and event (not (ignore-errors (dbus-check-event event)))) (setq unread-command-events (append unread-command-events (list event))))))) -- 2.11.4.GIT