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 <tazjin@tvl.su>
This commit is contained in:
Vincent Ambo 2023-08-28 22:20:09 +03:00 committed by tazjin
parent c9034186df
commit 690f73074c

View file

@ -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)