branch: elpa/keycast
commit c156fd1c5ee02fc6395dcf10cb55cbd6fc5296a9
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
Use define-advice instead of advice-add
---
keycast.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/keycast.el b/keycast.el
index 5ef25b3cc9..4505f0bdbc 100644
--- a/keycast.el
+++ b/keycast.el
@@ -496,12 +496,12 @@ t to show the actual COMMAND, or a symbol to be shown
instead."
(?r . ,r)
(?R . ,(propertize r 'face 'shadow)))))))))
-(defun keycast--read-passwd (fn prompt &optional confirm default)
+(define-advice read-passwd
+ (:around (fn prompt &optional confirm default) keycast)
+ "Suppress echoing keys while reading passwords."
(let ((keycast--reading-passwd t))
(funcall fn prompt confirm default)))
-(advice-add 'read-passwd :around #'keycast--read-passwd)
-
(defun keycast-bottom-right-window-p ()
(and (window-at-side-p nil 'right)
(window-at-side-p nil 'bottom)))