[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bluetooth 7198f6b1a5 26/32: correct bluetooth--with-ali
From: |
Stefan Kangas |
Subject: |
[elpa] externals/bluetooth 7198f6b1a5 26/32: correct bluetooth--with-alias in case of unknown devices |
Date: |
Mon, 3 Jan 2022 15:11:08 -0500 (EST) |
branch: externals/bluetooth
commit 7198f6b1a5514659cc32415b790696a5f54bca2a
Author: Raffael Stocker <r.stocker@mnet-mail.de>
Commit: Raffael Stocker <r.stocker@mnet-mail.de>
correct bluetooth--with-alias in case of unknown devices
---
bluetooth.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/bluetooth.el b/bluetooth.el
index 1da5fc1158..de28743296 100644
--- a/bluetooth.el
+++ b/bluetooth.el
@@ -495,9 +495,11 @@ form by a call to ‘bluetooth-device-properties’."
(defmacro bluetooth--with-alias (device &rest body)
"Evaluate BODY with DEVICE alias bound to ALIAS."
(declare (indent defun))
- `(let* ((dev (bluetooth--device (cl-first (last (split-string ,device
"/")))))
- (alias (or (bluetooth-device-property dev "Alias")
- (replace-regexp-in-string "_" ":" dev
nil nil nil 4))))
+ `(let* ((dev-id (cl-first (last (split-string ,device "/"))))
+ (dev (bluetooth--device dev-id))
+ (alias (if dev
+ (bluetooth-device-property dev "Alias")
+ (replace-regexp-in-string "_" ":" dev-id nil
nil nil 4))))
,@body))
(defmacro bluetooth--maybe-cancel-reject (&rest body)
- [elpa] externals/bluetooth ddad595699 23/32: move command definitions to bottom of file, (continued)
- [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
- [elpa] externals/bluetooth 7ed3db7260 32/32: Release 0.3 and bump copyright year, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth ab3a4c9cc5 18/32: move bluetooth--create-device to the other --device functions, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth a20d488f9a 28/32: delete invalid todo, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth b6c501ae6e 04/32: add bluetooth--adapters function, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth cc8f69992d 06/32: adjust initial hash table sizes, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 0ba4d39085 13/32: correct indentation, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 7198f6b1a5 26/32: correct bluetooth--with-alias in case of unknown devices,
Stefan Kangas <=
- [elpa] externals/bluetooth 301c37f388 27/32: list device only when properties are available, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 20bd089399 30/32: update UUIDs, Stefan Kangas, 2022/01/03