aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lispref/advice.texi37
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.
240All subroutines used by the advice need to be available when the byte 240All subroutines used by the advice need to be available when the byte
241compiler expands the macro. 241compiler expands the macro.
242 242
243@deffn Command ad-unadvise function
244This command deletes the advice from @var{function}.
245@end deffn
246
247@deffn Command ad-unadvise-all
248This 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
371This command activates the advice for @var{function}
372if its advice is already activated. This is useful
373if you change the advice.
374@end deffn
375
362@deffn Command ad-activate-all &optional compile 376@deffn Command ad-activate-all &optional compile
363This command activates the advice for all functions. 377This 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.
367This command deactivates the advice for all functions. 381This command deactivates the advice for all functions.
368@end deffn 382@end deffn
369 383
384@deffn Command ad-update-all &optional compile
385This command activates the advice for all functions
386whose advice is already activated. This is useful
387if 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
371This command activates all pieces of advice whose names match 391This 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
395Turn on automatic advice activation when a function is defined or 415Turn on automatic advice activation when a function is defined or
396redefined. If you turn on this mode, then advice really does 416redefined. If you turn on this mode, then advice takes effect
397take effect immediately when defined. 417immediately 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
406This variable controls whether to compile the combined definition 426This variable controls whether to compile the combined definition
407that results from activating advice for a function. 427that results from activating advice for a function.
428
429A value of @code{always} specifies to compile unconditionally
430A value of @code{nil} specifies never compile the advice.
431
432A value of @code{maybe} specifies to compile if the byte-compiler is
433already loaded. A value of @code{like-original} specifies to compile
434the advice if the the original definition of the advised function is
435compiled or a built-in function.
436
437This 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
440to 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''