mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
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).
This commit is contained in:
parent
6d68fbd57f
commit
1a02683cee
1 changed files with 13 additions and 9 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue