From 7177393826c73c87ffe9b428f0e5edae244d7a98 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 29 Mar 2023 16:10:29 +0200 Subject: [PATCH] Fix D-Bus event loop when executing a keyboard macro * lisp/net/dbus.el (dbus-call-method): Don't loop for events when `executing-kbd-macro' is non-nil. (Bug#62018) --- lisp/net/dbus.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index f35d11db152..fff860b05c3 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -371,7 +371,11 @@ object is returned instead of a list containing this single Lisp object. (apply #'dbus-message-internal dbus-message-type-method-call bus service path interface method #'dbus-call-method-handler args)) - (result (cons :pending nil))) + (result (unless executing-kbd-macro (cons :pending nil)))) + + ;; While executing a keyboard macro, we run into an infinite loop, + ;; receiving the event -1. So we don't try to get the result. + ;; (Bug#62018) ;; Wait until `dbus-call-method-handler' has put the result into ;; `dbus-return-values-table'. If no timeout is given, use the -- 2.39.5