Subject: Re: bug#32828: 27.0.50; Docstring of `dbus-init-bus' incorrect

From: Michael Albinus <[email-masked]>
Date: Tue, 25 Sep 2018 11:33:38 +0200

Philipp <[email-masked]> writes:

Hi Philipp,

> The docstring of `dbus-init-bus' says:
>
>> The function returns a number, which counts the connections this Emacs
>> session has established to the BUS under the same unique name
>
> However:
>
> (dbus-init-bus :system)
>
> ==> ((:signal :system "org.freedesktop.DBus.Local" "Disconnected") (nil "/org/freedesktop/DBus/Local" dbus-handle-bus-disconnect))
>
> Looking at the definition of `dbus-init-bus', it seems that only a
> `prog1' form is missing to make the docstring correct:
>
>   (prog1 (dbus--init-bus ...) (dbus-register-signal ...))

Indeed. dbus--init-bus keeps the original implementation of dbus-init-bus.
It would be safe to apply this patch even to the emacs-26 branch, IMHO.

Eli?

Best regards, Michael.