diff options
| author | Gerd Moellmann | 1999-10-25 14:03:38 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 1999-10-25 14:03:38 +0000 |
| commit | 41982e72dee3a80940ac3c9c60ab8d265b993e14 (patch) | |
| tree | a8e83fed2af7724ffce21bdb476e79fdd7e873dd /lispref | |
| parent | 93baa0eab1ee525f818bb47ac95691b7e99fa9bd (diff) | |
| download | emacs-41982e72dee3a80940ac3c9c60ab8d265b993e14.tar.gz emacs-41982e72dee3a80940ac3c9c60ab8d265b993e14.zip | |
Patch by rms.
Diffstat (limited to 'lispref')
| -rw-r--r-- | lispref/advice.texi | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/lispref/advice.texi b/lispref/advice.texi index 2227e9d5881..567ea5f2bac 100644 --- a/lispref/advice.texi +++ b/lispref/advice.texi | |||
| @@ -240,6 +240,14 @@ expanded when a program is compiled, not when a compiled program is run. | |||
| 240 | All subroutines used by the advice need to be available when the byte | 240 | All subroutines used by the advice need to be available when the byte |
| 241 | compiler expands the macro. | 241 | compiler expands the macro. |
| 242 | 242 | ||
| 243 | @deffn Command ad-unadvise function | ||
| 244 | This command deletes the advice from @var{function}. | ||
| 245 | @end deffn | ||
| 246 | |||
| 247 | @deffn Command ad-unadvise-all | ||
| 248 | This command deletes all pieces of advice from all functions. | ||
| 249 | @end deffn | ||
| 250 | |||
| 243 | @node Around-Advice | 251 | @node Around-Advice |
| 244 | @section Around-Advice | 252 | @section Around-Advice |
| 245 | 253 | ||
| @@ -359,6 +367,12 @@ This command deactivates the advice for @var{function}. | |||
| 359 | @cindex advice, deactivating | 367 | @cindex advice, deactivating |
| 360 | @end deffn | 368 | @end deffn |
| 361 | 369 | ||
| 370 | @deffn Command ad-update function &optional compile | ||
| 371 | This command activates the advice for @var{function} | ||
| 372 | if its advice is already activated. This is useful | ||
| 373 | if you change the advice. | ||
| 374 | @end deffn | ||
| 375 | |||
| 362 | @deffn Command ad-activate-all &optional compile | 376 | @deffn Command ad-activate-all &optional compile |
| 363 | This command activates the advice for all functions. | 377 | This command activates the advice for all functions. |
| 364 | @end deffn | 378 | @end deffn |
| @@ -367,6 +381,12 @@ This command activates the advice for all functions. | |||
| 367 | This command deactivates the advice for all functions. | 381 | This command deactivates the advice for all functions. |
| 368 | @end deffn | 382 | @end deffn |
| 369 | 383 | ||
| 384 | @deffn Command ad-update-all &optional compile | ||
| 385 | This command activates the advice for all functions | ||
| 386 | whose advice is already activated. This is useful | ||
| 387 | if you change the advice of some functions. | ||
| 388 | @end deffn | ||
| 389 | |||
| 370 | @deffn Command ad-activate-regexp regexp &optional compile | 390 | @deffn Command ad-activate-regexp regexp &optional compile |
| 371 | This command activates all pieces of advice whose names match | 391 | This command activates all pieces of advice whose names match |
| 372 | @var{regexp}. More precisely, it activates all advice for any function | 392 | @var{regexp}. More precisely, it activates all advice for any function |
| @@ -393,8 +413,8 @@ last time it was activated. | |||
| 393 | 413 | ||
| 394 | @deffn Command ad-start-advice | 414 | @deffn Command ad-start-advice |
| 395 | Turn on automatic advice activation when a function is defined or | 415 | Turn on automatic advice activation when a function is defined or |
| 396 | redefined. If you turn on this mode, then advice really does | 416 | redefined. If you turn on this mode, then advice takes effect |
| 397 | take effect immediately when defined. | 417 | immediately when defined. |
| 398 | @end deffn | 418 | @end deffn |
| 399 | 419 | ||
| 400 | @deffn Command ad-stop-advice | 420 | @deffn Command ad-stop-advice |
| @@ -405,6 +425,19 @@ redefined. | |||
| 405 | @defopt ad-default-compilation-action | 425 | @defopt ad-default-compilation-action |
| 406 | This variable controls whether to compile the combined definition | 426 | This variable controls whether to compile the combined definition |
| 407 | that results from activating advice for a function. | 427 | that results from activating advice for a function. |
| 428 | |||
| 429 | A value of @code{always} specifies to compile unconditionally | ||
| 430 | A value of @code{nil} specifies never compile the advice. | ||
| 431 | |||
| 432 | A value of @code{maybe} specifies to compile if the byte-compiler is | ||
| 433 | already loaded. A value of @code{like-original} specifies to compile | ||
| 434 | the advice if the the original definition of the advised function is | ||
| 435 | compiled or a built-in function. | ||
| 436 | |||
| 437 | This variable takes effect only if the @var{compile} argument of | ||
| 438 | @code{ad-activate} (or any of the above functions) was supplied as | ||
| 439 | @code{nil}. If that argument is non-@code{nil}, that means | ||
| 440 | to compile the advice regardless. | ||
| 408 | @end defopt | 441 | @end defopt |
| 409 | 442 | ||
| 410 | If the advised definition was constructed during ``preactivation'' | 443 | If the advised definition was constructed during ``preactivation'' |