diff options
| author | Michael Albinus | 2012-06-13 13:56:53 +0200 |
|---|---|---|
| committer | Michael Albinus | 2012-06-13 13:56:53 +0200 |
| commit | 682cefaf0c2f61d8d83c3628ae3b0da880771dcf (patch) | |
| tree | 338d1e4ffa2d91159dbc4533f705339d4a5bdd8f | |
| parent | 773e1f087264966e61d4364520452822c6d763c4 (diff) | |
| download | emacs-682cefaf0c2f61d8d83c3628ae3b0da880771dcf.tar.gz emacs-682cefaf0c2f61d8d83c3628ae3b0da880771dcf.zip | |
* net/dbus.el (dbus-call-method): Use timeout for `read-event'.
Otherwise, it blocks in batch mode.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/net/dbus.el | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aa688799374..1e3908d487a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-06-13 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/dbus.el (dbus-call-method): Use timeout for `read-event'. | ||
| 4 | Otherwise, it blocks in batch mode. | ||
| 5 | |||
| 1 | 2012-06-13 Juanma Barranquero <lekktu@gmail.com> | 6 | 2012-06-13 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * help-mode.el (bookmark-make-record-default): Declare. | 8 | * 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. | |||
| 269 | ;; default 25". Events which are not from D-Bus must be restored. | 269 | ;; default 25". Events which are not from D-Bus must be restored. |
| 270 | (with-timeout ((if timeout (/ timeout 1000.0) 25)) | 270 | (with-timeout ((if timeout (/ timeout 1000.0) 25)) |
| 271 | (while (eq (gethash key dbus-return-values-table :ignore) :ignore) | 271 | (while (eq (gethash key dbus-return-values-table :ignore) :ignore) |
| 272 | (let ((event (let (unread-command-events) (read-event)))) | 272 | (let ((event (let (unread-command-events) (read-event nil nil 0.1)))) |
| 273 | (when (and event (not (ignore-errors (dbus-check-event event)))) | 273 | (when (and event (not (ignore-errors (dbus-check-event event)))) |
| 274 | (setq unread-command-events | 274 | (setq unread-command-events |
| 275 | (append unread-command-events (list event))))))) | 275 | (append unread-command-events (list event))))))) |