summaryrefslogtreecommitdiff
path: root/wifi-bluetooth-conf.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-07-01 12:54:20 +0800
committerJSDurand <mmemmew@gmail.com>2021-07-01 12:54:20 +0800
commit76debf422c0555a4db6d680645148d8eec9ed4be (patch)
tree521499361f27af1eec1b7fa0088ad9289efe7266 /wifi-bluetooth-conf.el
parentffc9e558c56538123ceec08cddbe866d95605d76 (diff)
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.
Diffstat (limited to 'wifi-bluetooth-conf.el')
-rw-r--r--wifi-bluetooth-conf.el8
1 files 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)