Each piece of advice has a flag that says whether it is enabled or
not. By enabling or disabling a piece of advice, you can turn it on
and off without having to undefine and redefine it. For example, here is
how to disable a particular piece of advice named
(ad-disable-advice 'foo 'before 'my-advice)
This function by itself only changes the enable flag for a piece of
advice. To make the change take effect in the advised definition, you
must activate the advice for
This command disables the piece of advice named name in class class on function.
This command enables the piece of advice named name in class class on function.
You can also disable many pieces of advice at once, for various functions, using a regular expression. As always, the changes take real effect only when you next reactivate advice for the functions in question.
This command disables all pieces of advice whose names match regexp, in all classes, on all functions.