[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1a02683 2/2: Make dbus work in a dumped Emacs
From: |
Lars Ingebrigtsen |
Subject: |
master 1a02683 2/2: Make dbus work in a dumped Emacs |
Date: |
Tue, 12 Oct 2021 07:57:58 -0400 (EDT) |
branch: master
commit 1a02683ceeb6fbcebd0d7bb71dce448177f1d228
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Make dbus work in a dumped Emacs
* lisp/net/dbus.el (dbus--init): Make into a defun.
(after-pdump-load-hook): Put it onto the new pdump hook so that
it's run after startup (bug#37331).
---
lisp/net/dbus.el | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 560ece6..3fff539 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -2252,15 +2252,19 @@ keywords `:system-private' or `:session-private',
respectively."
bus nil dbus-path-local dbus-interface-local
"Disconnected" #'dbus-handle-bus-disconnect)))
-
-;; Initialize `:system' and `:session' buses. This adds their file
-;; descriptors to input_wait_mask, in order to detect incoming
-;; messages immediately.
-(when (featurep 'dbusbind)
- (dbus-ignore-errors
- (dbus-init-bus :system))
- (dbus-ignore-errors
- (dbus-init-bus :session)))
+
+(defun dbus--init ()
+ ;; Initialize `:system' and `:session' buses. This adds their file
+ ;; descriptors to input_wait_mask, in order to detect incoming
+ ;; messages immediately.
+ (when (featurep 'dbusbind)
+ (dbus-ignore-errors
+ (dbus-init-bus :system))
+ (dbus-ignore-errors
+ (dbus-init-bus :session))))
+
+(add-hook 'after-pdump-load-hook #'dbus--init)
+(dbus--init)
(provide 'dbus)