From 76debf422c0555a4db6d680645148d8eec9ed4be Mon Sep 17 00:00:00 2001 From: JSDurand Date: Thu, 1 Jul 2021 12:54:20 +0800 Subject: wifi-bluetooth: don't clear the scanned SSIDs if not updating it. * wifi-bluetooth-conf.el (durand-wifi-scanned-ssids): (durand-wifi-list-sentinel): Only update durand-wifi-scanned-ssids if we are about to update it. --- wifi-bluetooth-conf.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wifi-bluetooth-conf.el b/wifi-bluetooth-conf.el index 588024d..4024ffb 100644 --- a/wifi-bluetooth-conf.el +++ b/wifi-bluetooth-conf.el @@ -154,13 +154,13 @@ If ARG is non-nil, then list the currently connected port." (cons "1-20-4F" "wifi-4") (cons "1-20-4F_2EX" "wifi-4")) "A list of associations between the SSID of WIFI and the - machine name that we can use to search for the password in my - secret file.") +machine name that we can use to search for the password in my +secret file.") ;;;###autoload (defvar durand-wifi-scanned-ssids nil "The variable that holds the list of SSIDs of WIFI ports found - during the scan.") +during the scan.") ;;;###autoload (defvar durand-wifi-join-history nil @@ -212,13 +212,13 @@ This only does something when STATUS is the string \"finished\\n\"." process))) (let (first-var) (cond ((string-equal status "finished\n") - (setq durand-wifi-scanned-ssids nil) (with-current-buffer durand-wifi-bluetooth-buffer (goto-char (point-min)) (cond ((re-search-forward "AirPort: Off" nil t) (message "Wifi is not enabled.")) ((re-search-forward "\\s-+SSID" (line-end-position) t) (setq first-var t) + (setq durand-wifi-scanned-ssids nil) (forward-line 1) (let ((start 0)) (while (re-search-forward "\\S-" (line-end-position) t) -- cgit v1.2.3-18-g5258