Mercurial > emacs
comparison lispref/advice.texi @ 51883:0eb7f2196a0c
Minor cleanups of previous changes.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 12 Jul 2003 21:55:24 +0000 |
parents | d42b31a4657f |
children | 695cf19ef79e |
comparison
equal
deleted
inserted
replaced
51882:2ba0fcfcd670 | 51883:0eb7f2196a0c |
---|---|
330 @cindex activating advice | 330 @cindex activating advice |
331 @cindex advice, activating | 331 @cindex advice, activating |
332 | 332 |
333 By default, advice does not take effect when you define it---only when | 333 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 | 334 you @dfn{activate} advice for the function that was advised. However |
335 the advice will be automatically activated when the function is | 335 the advice will be automatically activated if the function is defined |
336 defined or redefined later. You can request the activation of advice | 336 or redefined later. You can request the activation of advice for a |
337 for a function when you define the advice, by specifying the | 337 function when you define the advice, by specifying the @code{activate} |
338 @code{activate} flag in the @code{defadvice}. But normally you | 338 flag in the @code{defadvice}. But normally you activate the advice |
339 activate the advice for a function by calling the function | 339 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 | 340 the other activation commands listed below. |
341 below. | |
342 | 341 |
343 Separating the activation of advice from the act of defining it permits | 342 Separating the activation of advice from the act of defining it permits |
344 you to add several pieces of advice to one function efficiently, without | 343 you to add several pieces of advice to one function efficiently, without |
345 redefining the function over and over as each advice is added. More | 344 redefining the function over and over as each advice is added. More |
346 importantly, it permits defining advice for a function before that | 345 importantly, it permits defining advice for a function before that |
416 last time it was activated. | 415 last time it was activated. |
417 @end deffn | 416 @end deffn |
418 | 417 |
419 @deffn Command ad-start-advice | 418 @deffn Command ad-start-advice |
420 Turn on automatic advice activation when a function is defined or | 419 Turn on automatic advice activation when a function is defined or |
421 redefined. This mode is turned on by default. | 420 redefined. This is the default mode. |
422 @end deffn | 421 @end deffn |
423 | 422 |
424 @deffn Command ad-stop-advice | 423 @deffn Command ad-stop-advice |
425 Turn off automatic advice activation when a function is defined or | 424 Turn off automatic advice activation when a function is defined or |
426 redefined. | 425 redefined. |