all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: p.stephani2@gmail.com, 32828@debbugs.gnu.org
Subject: bug#32828: 27.0.50; Docstring of `dbus-init-bus' incorrect
Date: Tue, 25 Sep 2018 11:55:39 +0200	[thread overview]
Message-ID: <87ftxxaokk.fsf@gmx.de> (raw)
In-Reply-To: <834ledap5c.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 25 Sep 2018 12:43:11 +0300")

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

Hi Eli,

>> >> 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?
>
> ENOPATCH

My question was, whether we could apply the proposed change to the
emacs-26 branch. What else are you missing? The patch itself? It's
obvious from Philipp's message, but here it is:


[-- Attachment #2: Type: text/plain, Size: 714 bytes --]

diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index f63ab9a15a..5f44c36034 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -1791,10 +1791,11 @@ dbus-init-bus
 this connection to those buses."
   (or (featurep 'dbusbind)
       (signal 'dbus-error (list "Emacs not compiled with dbus support")))
-  (dbus--init-bus bus private)
-  (dbus-register-signal
-   bus nil dbus-path-local dbus-interface-local
-   "Disconnected" #'dbus-handle-bus-disconnect))
+  (prog1
+      (dbus--init-bus bus private)
+    (dbus-register-signal
+     bus nil dbus-path-local dbus-interface-local
+     "Disconnected" #'dbus-handle-bus-disconnect)))
 
  \f
 ;; Initialize `:system' and `:session' buses.  This adds their file

[-- Attachment #3: Type: text/plain, Size: 24 bytes --]


Best regards, Michael.

  reply	other threads:[~2018-09-25  9:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-24 20:55 bug#32828: 27.0.50; Docstring of `dbus-init-bus' incorrect Philipp
2018-09-25  9:33 ` Michael Albinus
2018-09-25  9:43   ` Eli Zaretskii
2018-09-25  9:55     ` Michael Albinus [this message]
2018-09-25 10:25       ` Eli Zaretskii
2018-09-27 15:39 ` Michael Albinus
2018-09-27 16:38   ` Philipp Stephani
2018-09-28 10:55     ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ftxxaokk.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=32828@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=p.stephani2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.