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

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

[nongnu] elpa/with-simulated-input 6f7787df80 082/134: Add an unload fun


From: ELPA Syncer
Subject: [nongnu] elpa/with-simulated-input 6f7787df80 082/134: Add an unload function
Date: Mon, 10 Jan 2022 23:00:07 -0500 (EST)

branch: elpa/with-simulated-input
commit 6f7787df805f25ddcf958eff114f4d9eed8e2651
Author: Nikita Bloshchanevich <nikblos@outlook.com>
Commit: Nikita Bloshchanevich <nikblos@outlook.com>

    Add an unload function
    
    With it, `unload-feature' will remove the `current-idle-time' advice.
---
 with-simulated-input.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/with-simulated-input.el b/with-simulated-input.el
index a70e7eb523..73a01245ed 100644
--- a/with-simulated-input.el
+++ b/with-simulated-input.el
@@ -345,6 +345,10 @@ add other idle timers."
      (sleep-for (float-time (time-subtract stop-time
                                            wsi-simulated-idle-time))))))
 
+(defun with-simulated-input-unload-function ()
+  "Unload the `with-simulated-input' library."
+  (advice-remove 'current-idle-time 'current-idle-time@simulate-idle-time))
+
 (provide 'with-simulated-input)
 
 ;;; with-simulated-input.el ends here



reply via email to

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