FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 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-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version