[PATCH] Clear the clipboard and the Emacs kill ring
Thomas Preindl
thomas.preindl at gmail.com
Thu Oct 4 13:26:26 CEST 2018
---
contrib/emacs/password-store.el | 4 ++++
1 file changed, 4 insertions(+)
Hi,
using the Emacs plugin I noticed that only the Emacs kill ring and not
the OS clipboard is cleared after the timeout. This small patch would
fix this.
Thanks,
Thomas
diff --git a/contrib/emacs/password-store.el
b/contrib/emacs/password-store.el
index e31217c..1422062 100644
--- a/contrib/emacs/password-store.el
+++ b/contrib/emacs/password-store.el
@@ -195,6 +195,10 @@ Returns the first line of the password data."
(cancel-timer password-store-timeout-timer)
(setq password-store-timeout-timer nil))
(when password-store-kill-ring-pointer
+ (when (and interprogram-cut-function
+ (string= (car password-store-kill-ring-pointer)
+ (current-kill 0 't)))
+ (funcall interprogram-cut-function ""))
(setcar password-store-kill-ring-pointer "")
(setq password-store-kill-ring-pointer nil)
(message "Password cleared.")))
--
2.19.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20181004/9368867a/attachment.html>
More information about the Password-Store
mailing list