Function: ad-unadvise
ad-unadvise is an interactive and byte-compiled function defined in
advice.el.gz.
Signature
(ad-unadvise FUNCTION)
Documentation
Deactivate FUNCTION and then remove all its advice information.
If FUNCTION was not advised this will be a noop.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/advice.el.gz
(defun ad-unadvise (function)
"Deactivate FUNCTION and then remove all its advice information.
If FUNCTION was not advised this will be a noop."
(interactive
(list (ad-read-advised-function "Unadvise function")))
(cond ((ad-is-advised function)
(if (ad-is-active function)
(ad-deactivate function))
(ad-clear-advicefunname-definition function)
(ad-set-advice-info function nil)
(ad-pop-advised-function function))))