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:
parent
c9034186df
commit
690f73074c
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue