[Top][All Lists]

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

[elpa] externals/bluetooth 2f8f31c 08/33: adds an unload function

From: Stefan Monnier
Subject: [elpa] externals/bluetooth 2f8f31c 08/33: adds an unload function
Date: Sat, 19 Sep 2020 08:43:20 -0400 (EDT)

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

    adds an unload function
 bluetooth.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/bluetooth.el b/bluetooth.el
index c0914b2..9661765 100644
--- a/bluetooth.el
+++ b/bluetooth.el
@@ -351,6 +351,12 @@ This function only uses the first adapter reported by 
     (mapc #'dbus-unregister-object bluetooth--method-objects)
     (dbus-unregister-object bluetooth--adapter-signal)))
+(defun bluetooth-unload-function ()
+  "Clean up when the bluetooth feature is unloaded."
+  (when (buffer-live-p (get-buffer bluetooth-buffer-name))
+    (kill-buffer bluetooth-buffer-name))
+  nil)
 (defun bluetooth-remove-device ()
   "Remove Bluetooth device at point (unpaires device and host)."

reply via email to

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