[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bluetooth f75ac5e43d 11/32: clean up the method registr
From: |
Stefan Kangas |
Subject: |
[elpa] externals/bluetooth f75ac5e43d 11/32: clean up the method registration function |
Date: |
Mon, 3 Jan 2022 15:11:07 -0500 (EST) |
branch: externals/bluetooth
commit f75ac5e43d6cc23b2ebd29b9c5436edcd576e4a2
Author: Raffael Stocker <r.stocker@mnet-mail.de>
Commit: Raffael Stocker <r.stocker@mnet-mail.de>
clean up the method registration function
---
bluetooth.el | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/bluetooth.el b/bluetooth.el
index 081751558c..b8fb11c6a2 100644
--- a/bluetooth.el
+++ b/bluetooth.el
@@ -643,7 +643,7 @@ scanning the bus, displaying device info etc."
(bluetooth-mode)
(setq bluetooth--device-info (make-hash-table :test #'equal))
(bluetooth--update-device-info)
- (bluetooth--register-agent)
+ (setq bluetooth--method-objects (bluetooth--register-agent))
(cl-pushnew bluetooth--mode-info mode-line-process)
(add-hook 'kill-buffer-hook #'bluetooth--cleanup nil t)
(setq imenu-create-index-function #'bluetooth--create-imenu-index)
@@ -754,21 +754,21 @@ scanning the bus, displaying device info etc."
(let ((methods '("Release" "RequestPinCode" "DisplayPinCode"
"RequestPasskey" "DisplayPasskey"
"RequestConfirmation"
"RequestAuthorization" "AuthorizeService"
"Cancel")))
- (setq bluetooth--method-objects
- (cl-loop for method in methods
- for fname = (bluetooth--function-name method
"-")
- collect (dbus-register-method
bluetooth-bluez-bus
-
dbus-service-emacs
-
bluetooth--own-path
-
(alist-get
-
:agent
-
bluetooth--interfaces)
-
method (intern fname) t))))
- (dbus-register-service :session dbus-service-emacs)
- (dbus-call-method bluetooth-bluez-bus bluetooth--service bluetooth--root
- (alist-get :agent-manager
bluetooth--interfaces)
- "RegisterAgent"
- :object-path bluetooth--own-path
"KeyboardDisplay"))
+ (prog1
+ (cl-loop for method in methods
+ for fname = (bluetooth--function-name method
"-")
+ collect (dbus-register-method
bluetooth-bluez-bus
+
dbus-service-emacs
+
bluetooth--own-path
+
(alist-get
+
:agent
+
bluetooth--interfaces)
+
method (intern fname) t))
+ (dbus-register-service :session dbus-service-emacs)
+ (dbus-call-method bluetooth-bluez-bus bluetooth--service
bluetooth--root
+ (alist-get :agent-manager
bluetooth--interfaces)
+ "RegisterAgent"
+ :object-path
bluetooth--own-path "KeyboardDisplay"))))
;;;; service and class UUID definitions
- [elpa] externals/bluetooth 3d0fe7ed9d 09/32: use a struct for the adapter property display in the mode line, (continued)
- [elpa] externals/bluetooth 3d0fe7ed9d 09/32: use a struct for the adapter property display in the mode line, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth ada89f2faa 10/32: clean up the signal handler function, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth f971b21d66 03/32: use a structure and hash table for device-info, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 8edeb34f61 05/32: add bluetooth--adapter-properties function, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth bd95b1ca0b 15/32: revert to mapc instead of --map when used for side-effects only, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 273306e1e0 25/32: update the list view more intelligently, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 9878aa8051 14/32: add adapter parameters in adapter-properties and devices functions, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth f2d43ebab5 16/32: make bluetooth--choose-uuid somewhat more readable, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 5a49391b00 07/32: clean up device property handling (breaks info view code), Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 0627cceab3 08/32: clean up the info view code and add an adapter info view, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth f75ac5e43d 11/32: clean up the method registration function,
Stefan Kangas <=
- [elpa] externals/bluetooth e69e4151ff 12/32: clean things up for readability, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth a411243fbe 17/32: add a function for bluetooth device info access, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 7a78351220 19/32: set tabulated-list-padding to 0, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 1f048b5949 20/32: clean up and drop multiple adapter plans, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth fa3761da3c 21/32: add timer to periodically update the device table in discovery mode, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth c75d2e3495 22/32: handle removal of devices in list view, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth ddad595699 23/32: move command definitions to bottom of file, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 1254ec44d2 24/32: add signal handlers for paired devices, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 7a0ba3c7ea 29/32: update Readme.org, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 1fcdce66f8 31/32: require dash 2.18.1, Stefan Kangas, 2022/01/03