emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/bluetooth 301c37f388 27/32: list device only when prope


From: Stefan Kangas
Subject: [elpa] externals/bluetooth 301c37f388 27/32: list device only when properties are available
Date: Mon, 3 Jan 2022 15:11:09 -0500 (EST)

branch: externals/bluetooth
commit 301c37f3881f48785e33f5b21ee8c890dcaa5816
Author: Raffael Stocker <r.stocker@mnet-mail.de>
Commit: Raffael Stocker <r.stocker@mnet-mail.de>

    list device only when properties are available
---
 bluetooth.el | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/bluetooth.el b/bluetooth.el
index de28743296..fff105822c 100644
--- a/bluetooth.el
+++ b/bluetooth.el
@@ -316,12 +316,13 @@ as they are used to gather the information from Bluez.")
 (defun bluetooth--list-entries ()
   "Provide the list entries for the tabulated view."
   (let (dev-list)
-       (maphash (lambda (dev dev-info)
-                          (push (list dev
-                                                  (cl-map 'vector (lambda (key)
-                                                                               
         (bluetooth--device-state key dev-info))
-                                                                  (mapcar 
#'cl-first bluetooth--list-format)))
-                                        dev-list))
+       (maphash (lambda (dev-id device)
+                          (when (bluetooth-device-properties device)
+                                (push (list dev-id
+                                                        (cl-map 'vector 
(lambda (key)
+                                                                               
           (bluetooth--device-state key device))
+                                                                        
(mapcar #'cl-first bluetooth--list-format)))
+                                          dev-list)))
                         bluetooth--device-info)
        dev-list))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]