All Manuals > LispWorks User Guide and Reference Manual > 6 The Advice Facility

NextPrevUpTopContentsIndex

6.2 Combining the advice

We have already seen how a before and an after piece of advice may be combined, and this section describes the general algorithm. There are three types of advice: before , after and around . These resemble before, after and around methods in CLOS. There may be several pieces of each type of advice present for a particular function.

The first step in working out how the combination is done is to order the pieces of advice. All the around advice comes first, then all the before advice, then the original definition, and lastly the after advice. The order within each of the around, before and after sections defaults to the order in which the pieces of advice were defined (that is most recent first). See defadvice for details of how to control the ordering of advice within each section.

The remainder of this section discusses what happens when a function that has advice is called.

6.2.1 :before and :after advice

6.2.2 :around advice


LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex