FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

advise-1

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.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version