advise-1

Function

Package: excl

Arguments: fspec class name position forms

Starting in Allegro CL release 6.0, the new fwrapper facility, described in fwrappers-and-advice.htm, replaces the advice facility, and continued use of the advice facility is deprecated.

This function actually does the work of advising. With the exception of the forms argument, its arguments have the same meaning as in advise, except here they are evaluated (of course). The forms argument is not an &rest argument, so instead it is a list of forms to be evaluated. Warning: forms cannot be the single form nil. If you want the single form nil (in, for example, :around advice to not call the function and return nil), specify (progn nil) instead.

See the definition of advise for further explanation of the arguments.

The following examples demonstrate the differences between a call to advise and a call to advise-1. The two forms have exactly the same effect.

excl:advise foo :before jim 100
 (format t "hello~%") (format t "hello again~%"))
(excl:advise-1 'foo :before 'jim 100
 '((format t "hello~%") (format t "hello again~%"))) 

Even a single form must be in a list in calls to advise-1.

See also fwrappers-and-advice.htm for general information on the new fwrapper facility and the older, now deprecated, advice facility in Allegro CL.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.