diff options
| author | Lars Ingebrigtsen | 2021-10-12 13:56:47 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-10-12 13:57:52 +0200 |
| commit | 1a02683ceeb6fbcebd0d7bb71dce448177f1d228 (patch) | |
| tree | e58c619f5806b63ce9988eae919a558bc85d93b7 | |
| parent | 6d68fbd57f730051dd3af470e7b0c41b41238bd0 (diff) | |
| download | emacs-1a02683ceeb6fbcebd0d7bb71dce448177f1d228.tar.gz emacs-1a02683ceeb6fbcebd0d7bb71dce448177f1d228.zip | |
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).
| -rw-r--r-- | lisp/net/dbus.el | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index 560ece67517..3fff5398c06 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el | |||
| @@ -2252,15 +2252,19 @@ keywords `:system-private' or `:session-private', respectively." | |||
| 2252 | bus nil dbus-path-local dbus-interface-local | 2252 | bus nil dbus-path-local dbus-interface-local |
| 2253 | "Disconnected" #'dbus-handle-bus-disconnect))) | 2253 | "Disconnected" #'dbus-handle-bus-disconnect))) |
| 2254 | 2254 | ||
| 2255 | 2255 | ||
| 2256 | ;; Initialize `:system' and `:session' buses. This adds their file | 2256 | (defun dbus--init () |
| 2257 | ;; descriptors to input_wait_mask, in order to detect incoming | 2257 | ;; Initialize `:system' and `:session' buses. This adds their file |
| 2258 | ;; messages immediately. | 2258 | ;; descriptors to input_wait_mask, in order to detect incoming |
| 2259 | (when (featurep 'dbusbind) | 2259 | ;; messages immediately. |
| 2260 | (dbus-ignore-errors | 2260 | (when (featurep 'dbusbind) |
| 2261 | (dbus-init-bus :system)) | 2261 | (dbus-ignore-errors |
| 2262 | (dbus-ignore-errors | 2262 | (dbus-init-bus :system)) |
| 2263 | (dbus-init-bus :session))) | 2263 | (dbus-ignore-errors |
| 2264 | (dbus-init-bus :session)))) | ||
| 2265 | |||
| 2266 | (add-hook 'after-pdump-load-hook #'dbus--init) | ||
| 2267 | (dbus--init) | ||
| 2264 | 2268 | ||
| 2265 | (provide 'dbus) | 2269 | (provide 'dbus) |
| 2266 | 2270 | ||