From 690f73074cbe7b5fe498162c6d0b65576c103e08 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 28 Aug 2023 22:20:09 +0300 Subject: feat(tazjin/emacs): add occasionally useful advice-remove-all helper Change-Id: I66981e8bec300dff48d7a549f2d2847c637a4557 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9160 Tested-by: BuildkiteCI Reviewed-by: tazjin --- users/tazjin/emacs/config/functions.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'users/tazjin') diff --git a/users/tazjin/emacs/config/functions.el b/users/tazjin/emacs/config/functions.el index 6e2cff7caec9..df36c7eb882c 100644 --- a/users/tazjin/emacs/config/functions.el +++ b/users/tazjin/emacs/config/functions.el @@ -349,4 +349,9 @@ installed (and visible) XDG apps, and let users launch them." (run-external-command--handler (cdr (assoc (completing-read "App: " apps nil t) apps))))) +(defun advice-remove-all (sym) + "Remove all advices from symbol SYM." + (interactive "aFunction symbol: ") + (advice-mapc (lambda (advice _props) (advice-remove sym advice)) sym)) + (provide 'functions) -- cgit 1.4.1