332 |
|
|
333 |
By default, advice does not take effect when you define it---only when |
By default, advice does not take effect when you define it---only when |
334 |
you @dfn{activate} advice for the function that was advised. However |
you @dfn{activate} advice for the function that was advised. However |
335 |
the advice will be automatically activated when the function is |
the advice will be automatically activated if the function is defined |
336 |
defined or redefined later. You can request the activation of advice |
or redefined later. You can request the activation of advice for a |
337 |
for a function when you define the advice, by specifying the |
function when you define the advice, by specifying the @code{activate} |
338 |
@code{activate} flag in the @code{defadvice}. But normally you |
flag in the @code{defadvice}. But normally you activate the advice |
339 |
activate the advice for a function by calling the function |
for a function by calling the function @code{ad-activate} or one of |
340 |
@code{ad-activate} or one of the other activation commands listed |
the other activation commands listed below. |
|
below. |
|
341 |
|
|
342 |
Separating the activation of advice from the act of defining it permits |
Separating the activation of advice from the act of defining it permits |
343 |
you to add several pieces of advice to one function efficiently, without |
you to add several pieces of advice to one function efficiently, without |
417 |
|
|
418 |
@deffn Command ad-start-advice |
@deffn Command ad-start-advice |
419 |
Turn on automatic advice activation when a function is defined or |
Turn on automatic advice activation when a function is defined or |
420 |
redefined. This mode is turned on by default. |
redefined. This is the default mode. |
421 |
@end deffn |
@end deffn |
422 |
|
|
423 |
@deffn Command ad-stop-advice |
@deffn Command ad-stop-advice |