Function: ad-remove-advice
ad-remove-advice is an interactive and byte-compiled function defined
in advice.el.gz.
Signature
(ad-remove-advice FUNCTION CLASS NAME)
Documentation
Remove FUNCTION's advice with NAME from its advices in CLASS.
If such an advice was found it will be removed from the list of advices in that CLASS.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/advice.el.gz
(defun ad-remove-advice (function class name)
"Remove FUNCTION's advice with NAME from its advices in CLASS.
If such an advice was found it will be removed from the list of advices
in that CLASS."
(interactive (ad-read-advice-specification "Remove advice of"))
(if (ad-is-advised function)
(let ((advice-to-remove (ad-find-advice function class name)))
(if advice-to-remove
(ad-set-advice-info-field
function class
(delq advice-to-remove (ad-get-advice-info-field function class)))
(error "ad-remove-advice: `%s' has no %s advice `%s'"
function class name)))
(error "ad-remove-advice: `%s' is not advised" function)))