Function: ad-recover
ad-recover is an interactive and byte-compiled function defined in
advice.el.gz.
Signature
(ad-recover FUNCTION)
Documentation
Try to recover FUNCTION's original definition, and unadvise it.
This is more low-level than ad-unadvise in that it does not do
deactivation, which might run hooks and get into other trouble.
Use in emergencies.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/advice.el.gz
(defun ad-recover (function)
"Try to recover FUNCTION's original definition, and unadvise it.
This is more low-level than `ad-unadvise' in that it does not do
deactivation, which might run hooks and get into other trouble.
Use in emergencies."
;; Use more primitive interactive behavior here: Accept any symbol that's
;; currently defined in obarray, not necessarily with a function definition:
(interactive
(list (intern
(completing-read "Recover advised function: " obarray nil t))))
(cond ((ad-is-advised function)
(ad-clear-advicefunname-definition function)
(ad-set-advice-info function nil)
(ad-pop-advised-function function))))