about summary refs log tree commit diff
path: root/users/tazjin
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@tvl.su>2023-08-28T19·20+0300
committertazjin <tazjin@tvl.su>2023-08-28T19·40+0000
commit690f73074cbe7b5fe498162c6d0b65576c103e08 (patch)
tree10811427048653039403cf0983a8d827b10c117f /users/tazjin
parentc9034186df9e9bc41f39a7ee43861154f57e3a27 (diff)
feat(tazjin/emacs): add occasionally useful advice-remove-all helper r/6531
Change-Id: I66981e8bec300dff48d7a549f2d2847c637a4557
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9160
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'users/tazjin')
-rw-r--r--users/tazjin/emacs/config/functions.el5
1 files changed, 5 insertions, 0 deletions
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)