describe-advice

$Revision: 5.0.2.3 $

Function

Package: EXCL

Arguments: (fspec &optional stream)

This function prints a description of the advice on fspec and then returns nil. fspec must be a function name (it is typically a symbol) identifying a function or macro. stream specifies the stream where the description will be written. The default value for stream is t, indicating the stream bound to *standard-output*.

Advice is described by name and listed in the order in which it runs. The following (rather simple-minded) example shows how the output looks. See advice.htm for general information on advice. The general documentation description is in introduction.htm. The index in index.htm.

;; Define the function and the advice:
(defun foo nil nil)
(excl:advise foo :before jack nil (format t "jack~%"))
(excl:advise foo :before nil nil (format t "nil 1~%"))
(excl:advise foo :before nil 100 (format t "nil 2~%"))
(excl:advise foo :after jill nil (format t "jill~%"))
(excl:advise foo :after nil nil (format t "nil 3~%"))

;; Now when foo is run, the following is printed:
USR(12): (foo)
nil 1
jack
nil 2
jill
nil 3
 
nil
USER(13): (excl:describe-advice 'foo)
Before advice:
(nil (format t "nil 1~%"))
(jack (format t "jack~%"))
(nil (format t "nil 2~%"))
After advice:
(jill (format t "jill~%"))
(nil (format t "nil 3~%"))
nil
USER(14):

Copyright (C) 1998-1999, Franz Inc., Berkeley, CA. All Rights Reserved.