The cl-advice Reference Manual

This is the cl-advice Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Jan 15 04:36:45 2023 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-advice

Portable advice for Common Lisp

Author

szos at posteo dot net

License

LGPL

Version

0.0.1

Dependency

closer-mop (system).

Source

cl-advice.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-advice/cl-advice.asd

Source

cl-advice.asd.

Parent Component

cl-advice (system).

ASDF Systems

cl-advice.


3.1.2 cl-advice/package.lisp

Source

cl-advice.asd.

Parent Component

cl-advice (system).

Packages

cl-advice.


3.1.3 cl-advice/cl-advice.lisp

Dependency

package.lisp (file).

Source

cl-advice.asd.

Parent Component

cl-advice (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-advice

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *allow-implicit-conversion*

Controls whether variables can implicitly be converted to advisable functions. When NIL implicit conversion signals an error.

Package

cl-advice.

Source

cl-advice.lisp.


5.1.2 Macros

Macro: advisable-lambda (argslist &body body)
Package

cl-advice.

Source

cl-advice.lisp.

Macro: define-advisory-functions ((to-advise &key next-arg) args &body advice)

Define advisable functions and add them to TO-ADVISE.

Package

cl-advice.

Source

cl-advice.lisp.

Macro: defun-advisable (name argslist &body body)

Define a function as an advisable function - works the same as DEFUN.

Package

cl-advice.

Source

cl-advice.lisp.

Macro: with-implicit-conversion ((allow-or-not &optional abort-on-implicit-conversion return-on-abort) &body body)

Allow or disallow implicit conversions to advisable functions.

If ALLOWED-OR-NOT is :allowed then conversions are allowed, otherwise they are disallowed.

If ABORT-ON-IMPLICIT-CONVERSION is T, a handler is established for implicit conversion errors which immediately returns RETURN-ON-ABORT.

Package

cl-advice.

Source

cl-advice.lisp.


5.1.3 Compiler macros

Compiler Macro: make-advisable (symbol &key arguments force-use-arguments)
Package

cl-advice.

Source

cl-advice.lisp.


5.1.4 Ordinary functions

Function: add-advice (where function advice-function &key allow-duplicates test from-end)

Add ADVICE-FUNCTION to FUNCTION. WHERE must be one of :before, :around, or :after. If ALLOW-DUPLICATES is true, advice will be added regardless. TEST is used to check if ADVICE-FUNCTION is already present. When FROM-END is true, advice will be appended instead of prepended.

Package

cl-advice.

Source

cl-advice.lisp.

Function: advisable-function-p (object)

Check if OBJECT is an advisable function

Package

cl-advice.

Source

cl-advice.lisp.

Function: ensure-advisable-function (symbol &optional arguments force-use-arguments)
Package

cl-advice.

Source

cl-advice.lisp.

Function: ensure-unadvisable-function (symbol)
Package

cl-advice.

Source

cl-advice.lisp.

Function: list-advice (fn &key type print)

List advice for FN, of type TYPE. When PRINT is true, advice will be printed to standard output.

Package

cl-advice.

Source

cl-advice.lisp.

Function: make-advisable (symbol &key arguments force-use-arguments)

Make the function denoted by SYMBOL an advisable function

Package

cl-advice.

Source

cl-advice.lisp.

Function: make-unadvisable (symbol)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-advice (type fn advice &key test)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-nth-advice (type fn nth)

Remove NTH advice advice from FNs advice list of type TYPE.

Package

cl-advice.

Source

cl-advice.lisp.

Function: replace-advice (where function old-advice new-advice &key test if-not-found)

Replace OLD-ADVICE with NEW-ADVICE in the advice list for FUNCTION denoted by WHERE. TEST is used to find OLD-ADVICE. IF-NOT-FOUND dictates what to do in the event OLD-ADVICE is not present. It may be one of :prepend, :append, or nil.

Package

cl-advice.

Source

cl-advice.lisp.


5.1.5 Standalone methods

Method: documentation ((obj advisable-function) (doctype (eql function)))
Source

cl-advice.lisp.

Method: documentation ((obj advisable-function) (doctype (eql t)))
Source

cl-advice.lisp.

Method: initialize-instance :after ((obj advisable-function) &key dispatcher-generator force-accurate-dispatcher-arglist &allow-other-keys)

Set the funcallable instance function.

If DISPATCHER-GENERATOR is provided it must be a function of arity one which will be passed the advisable function object and must return a dispatcher function.

Otherwise if FORCE-ACCURATE-DISPATCHER-ARGLIST is T and arguments were provided, then EVAL is used to generate a dispatcher function with the correct argument list.

Otherwise a generic dispatcher is used which takes a rest argument.

Source

cl-advice.lisp.

Method: initialize-instance :around ((obj advisable-function) &key main &allow-other-keys)

Normalize the function being advised to be a function object

Source

cl-advice.lisp.


5.1.6 Conditions

Condition: circular-advice-dependency
Package

cl-advice.

Source

cl-advice.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: f1
Initargs

:function

Readers

circular-advice-function.

Writers

This slot is read-only.

Slot: f2
Initargs

:advice

Readers

circular-advice-advice.

Writers

This slot is read-only.

Condition: implicit-conversion-to-advisable-function
Package

cl-advice.

Source

cl-advice.lisp.

Direct superclasses

error.

Direct methods

function-being-converted.

Direct slots
Slot: function-being-converted
Initargs

:function

Readers

function-being-converted.

Writers

This slot is read-only.


5.2 Internals


5.2.1 Macros

Macro: when-let1 ((var form) &body body)
Package

cl-advice.

Source

cl-advice.lisp.

Macro: with-gensyms (syms &body body)
Package

cl-advice.

Source

cl-advice.lisp.


5.2.2 Ordinary functions

Function: add-advice-after (function advice-fn &key allow-duplicates test from-end)
Package

cl-advice.

Source

cl-advice.lisp.

Function: add-advice-around (function advice-fn &key allow-duplicates test from-end)
Package

cl-advice.

Source

cl-advice.lisp.

Function: add-advice-before (function advice-fn &key allow-duplicates test from-end)
Package

cl-advice.

Source

cl-advice.lisp.

Function: apply-after (obj args)
Package

cl-advice.

Source

cl-advice.lisp.

Function: apply-around (obj args)
Package

cl-advice.

Source

cl-advice.lisp.

Function: apply-before (obj args)
Package

cl-advice.

Source

cl-advice.lisp.

Function: argument-list-to-apply-list (argslist)

This function is for use a macroexpansion time. It takes an ordinary lambda list and parses it into code to generate a list suitable for use with apply

Package

cl-advice.

Source

cl-advice.lisp.

Function: circular-advice-p (function advice-fn &key test)

check if theres a circular dependency between FUNCTION and ADVICE-FN.

Package

cl-advice.

Source

cl-advice.lisp.

Function: copy-advice (fn1 fn2)

DESTRUCTIVELY Copy all advice from FN1 to FN2

Package

cl-advice.

Source

cl-advice.lisp.

Function: generate-around-caller (function-list)
Package

cl-advice.

Source

cl-advice.lisp.

Function: generate-ignore-declarations (argument-list)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-advice-all (fn)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-advice-if (predicate type function &key from-end start end)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-advice-if-not (predicate type function &key from-end start end)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-after-advice-if (predicate function from-end start end)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-after-advice-if-not (predicate function from-end start end)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-around-advice-if (predicate function from-end start end)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-around-advice-if-not (predicate function from-end start end)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-before-advice-if (predicate function from-end start end)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-before-advice-if-not (predicate function from-end start end)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-nth (list nth)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-nth-advice-after (fn nth)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-nth-advice-around (fn nth)
Package

cl-advice.

Source

cl-advice.lisp.

Function: remove-nth-advice-before (fn nth)
Package

cl-advice.

Source

cl-advice.lisp.

Function: replace-advice-after (function old-advice new-advice test if-not-found)
Package

cl-advice.

Source

cl-advice.lisp.

Function: replace-advice-around (function old-advice new-advice test if-not-found)
Package

cl-advice.

Source

cl-advice.lisp.

Function: replace-advice-before (function old-advice new-advice test if-not-found)
Package

cl-advice.

Source

cl-advice.lisp.


5.2.3 Generic functions

Generic Reader: advisable-function-after (object)
Package

cl-advice.

Methods
Reader Method: advisable-function-after ((advisable-function advisable-function))

automatically generated reader method

Source

cl-advice.lisp.

Target Slot

after.

Generic Writer: (setf advisable-function-after) (object)
Package

cl-advice.

Methods
Writer Method: (setf advisable-function-after) ((advisable-function advisable-function))

automatically generated writer method

Source

cl-advice.lisp.

Target Slot

after.

Generic Reader: advisable-function-arguments (object)
Package

cl-advice.

Methods
Reader Method: advisable-function-arguments ((advisable-function advisable-function))

automatically generated reader method

Source

cl-advice.lisp.

Target Slot

arglist.

Generic Writer: (setf advisable-function-arguments) (object)
Package

cl-advice.

Methods
Writer Method: (setf advisable-function-arguments) ((advisable-function advisable-function))

automatically generated writer method

Source

cl-advice.lisp.

Target Slot

arglist.

Generic Reader: advisable-function-around (object)
Package

cl-advice.

Methods
Reader Method: advisable-function-around ((advisable-function advisable-function))

automatically generated reader method

Source

cl-advice.lisp.

Target Slot

around.

Generic Writer: (setf advisable-function-around) (object)
Package

cl-advice.

Methods
Writer Method: (setf advisable-function-around) ((advisable-function advisable-function))

automatically generated writer method

Source

cl-advice.lisp.

Target Slot

around.

Generic Reader: advisable-function-before (object)
Package

cl-advice.

Methods
Reader Method: advisable-function-before ((advisable-function advisable-function))

automatically generated reader method

Source

cl-advice.lisp.

Target Slot

before.

Generic Writer: (setf advisable-function-before) (object)
Package

cl-advice.

Methods
Writer Method: (setf advisable-function-before) ((advisable-function advisable-function))

automatically generated writer method

Source

cl-advice.lisp.

Target Slot

before.

Generic Reader: advisable-function-initialization-error-advisable-function (condition)
Package

cl-advice.

Methods
Reader Method: advisable-function-initialization-error-advisable-function ((condition advisable-function-initialization-error))
Source

cl-advice.lisp.

Target Slot

advisable-function.

Generic Reader: advisable-function-initialization-error-function (condition)
Package

cl-advice.

Methods
Reader Method: advisable-function-initialization-error-function ((condition advisable-function-initialization-error))
Source

cl-advice.lisp.

Target Slot

main-function.

Generic Reader: advisable-function-main (object)
Package

cl-advice.

Methods
Reader Method: advisable-function-main ((advisable-function advisable-function))

automatically generated reader method

Source

cl-advice.lisp.

Target Slot

main.

Generic Writer: (setf advisable-function-main) (object)
Package

cl-advice.

Methods
Writer Method: (setf advisable-function-main) ((advisable-function advisable-function))

automatically generated writer method

Source

cl-advice.lisp.

Target Slot

main.

Generic Reader: circular-advice-advice (condition)
Package

cl-advice.

Methods
Reader Method: circular-advice-advice ((condition circular-advice-dependency))
Source

cl-advice.lisp.

Target Slot

f2.

Generic Reader: circular-advice-function (condition)
Package

cl-advice.

Methods
Reader Method: circular-advice-function ((condition circular-advice-dependency))
Source

cl-advice.lisp.

Target Slot

f1.

Generic Reader: function-being-converted (condition)
Package

cl-advice.

Methods
Reader Method: function-being-converted ((condition implicit-conversion-to-advisable-function))
Source

cl-advice.lisp.

Target Slot

function-being-converted.

Generic Reader: not-an-advisable-function-function (condition)
Package

cl-advice.

Methods
Reader Method: not-an-advisable-function-function ((condition not-an-advisable-function))
Source

cl-advice.lisp.

Target Slot

fn.


5.2.4 Conditions

Condition: advisable-function-initialization-error
Package

cl-advice.

Source

cl-advice.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: advisable-function
Initargs

:advisable-function

Readers

advisable-function-initialization-error-advisable-function.

Writers

This slot is read-only.

Slot: main-function
Initargs

:function

Readers

advisable-function-initialization-error-function.

Writers

This slot is read-only.

Condition: not-an-advisable-function
Package

cl-advice.

Source

cl-advice.lisp.

Direct superclasses

error.

Direct methods

not-an-advisable-function-function.

Direct slots
Slot: fn
Initargs

:function

Readers

not-an-advisable-function-function.

Writers

This slot is read-only.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   C   D   E   F   G   I   L   M   N   R   W  
Index Entry  Section

(
(setf advisable-function-after): Private generic functions
(setf advisable-function-after): Private generic functions
(setf advisable-function-arguments): Private generic functions
(setf advisable-function-arguments): Private generic functions
(setf advisable-function-around): Private generic functions
(setf advisable-function-around): Private generic functions
(setf advisable-function-before): Private generic functions
(setf advisable-function-before): Private generic functions
(setf advisable-function-main): Private generic functions
(setf advisable-function-main): Private generic functions

A
add-advice: Public ordinary functions
add-advice-after: Private ordinary functions
add-advice-around: Private ordinary functions
add-advice-before: Private ordinary functions
advisable-function-after: Private generic functions
advisable-function-after: Private generic functions
advisable-function-arguments: Private generic functions
advisable-function-arguments: Private generic functions
advisable-function-around: Private generic functions
advisable-function-around: Private generic functions
advisable-function-before: Private generic functions
advisable-function-before: Private generic functions
advisable-function-initialization-error-advisable-function: Private generic functions
advisable-function-initialization-error-advisable-function: Private generic functions
advisable-function-initialization-error-function: Private generic functions
advisable-function-initialization-error-function: Private generic functions
advisable-function-main: Private generic functions
advisable-function-main: Private generic functions
advisable-function-p: Public ordinary functions
advisable-lambda: Public macros
apply-after: Private ordinary functions
apply-around: Private ordinary functions
apply-before: Private ordinary functions
argument-list-to-apply-list: Private ordinary functions

C
circular-advice-advice: Private generic functions
circular-advice-advice: Private generic functions
circular-advice-function: Private generic functions
circular-advice-function: Private generic functions
circular-advice-p: Private ordinary functions
Compiler Macro, make-advisable: Public compiler macros
copy-advice: Private ordinary functions

D
define-advisory-functions: Public macros
defun-advisable: Public macros
documentation: Public standalone methods
documentation: Public standalone methods

E
ensure-advisable-function: Public ordinary functions
ensure-unadvisable-function: Public ordinary functions

F
Function, add-advice: Public ordinary functions
Function, add-advice-after: Private ordinary functions
Function, add-advice-around: Private ordinary functions
Function, add-advice-before: Private ordinary functions
Function, advisable-function-p: Public ordinary functions
Function, apply-after: Private ordinary functions
Function, apply-around: Private ordinary functions
Function, apply-before: Private ordinary functions
Function, argument-list-to-apply-list: Private ordinary functions
Function, circular-advice-p: Private ordinary functions
Function, copy-advice: Private ordinary functions
Function, ensure-advisable-function: Public ordinary functions
Function, ensure-unadvisable-function: Public ordinary functions
Function, generate-around-caller: Private ordinary functions
Function, generate-ignore-declarations: Private ordinary functions
Function, list-advice: Public ordinary functions
Function, make-advisable: Public ordinary functions
Function, make-unadvisable: Public ordinary functions
Function, remove-advice: Public ordinary functions
Function, remove-advice-all: Private ordinary functions
Function, remove-advice-if: Private ordinary functions
Function, remove-advice-if-not: Private ordinary functions
Function, remove-after-advice-if: Private ordinary functions
Function, remove-after-advice-if-not: Private ordinary functions
Function, remove-around-advice-if: Private ordinary functions
Function, remove-around-advice-if-not: Private ordinary functions
Function, remove-before-advice-if: Private ordinary functions
Function, remove-before-advice-if-not: Private ordinary functions
Function, remove-nth: Private ordinary functions
Function, remove-nth-advice: Public ordinary functions
Function, remove-nth-advice-after: Private ordinary functions
Function, remove-nth-advice-around: Private ordinary functions
Function, remove-nth-advice-before: Private ordinary functions
Function, replace-advice: Public ordinary functions
Function, replace-advice-after: Private ordinary functions
Function, replace-advice-around: Private ordinary functions
Function, replace-advice-before: Private ordinary functions
function-being-converted: Private generic functions
function-being-converted: Private generic functions

G
generate-around-caller: Private ordinary functions
generate-ignore-declarations: Private ordinary functions
Generic Function, (setf advisable-function-after): Private generic functions
Generic Function, (setf advisable-function-arguments): Private generic functions
Generic Function, (setf advisable-function-around): Private generic functions
Generic Function, (setf advisable-function-before): Private generic functions
Generic Function, (setf advisable-function-main): Private generic functions
Generic Function, advisable-function-after: Private generic functions
Generic Function, advisable-function-arguments: Private generic functions
Generic Function, advisable-function-around: Private generic functions
Generic Function, advisable-function-before: Private generic functions
Generic Function, advisable-function-initialization-error-advisable-function: Private generic functions
Generic Function, advisable-function-initialization-error-function: Private generic functions
Generic Function, advisable-function-main: Private generic functions
Generic Function, circular-advice-advice: Private generic functions
Generic Function, circular-advice-function: Private generic functions
Generic Function, function-being-converted: Private generic functions
Generic Function, not-an-advisable-function-function: Private generic functions

I
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods

L
list-advice: Public ordinary functions

M
Macro, advisable-lambda: Public macros
Macro, define-advisory-functions: Public macros
Macro, defun-advisable: Public macros
Macro, when-let1: Private macros
Macro, with-gensyms: Private macros
Macro, with-implicit-conversion: Public macros
make-advisable: Public compiler macros
make-advisable: Public ordinary functions
make-unadvisable: Public ordinary functions
Method, (setf advisable-function-after): Private generic functions
Method, (setf advisable-function-arguments): Private generic functions
Method, (setf advisable-function-around): Private generic functions
Method, (setf advisable-function-before): Private generic functions
Method, (setf advisable-function-main): Private generic functions
Method, advisable-function-after: Private generic functions
Method, advisable-function-arguments: Private generic functions
Method, advisable-function-around: Private generic functions
Method, advisable-function-before: Private generic functions
Method, advisable-function-initialization-error-advisable-function: Private generic functions
Method, advisable-function-initialization-error-function: Private generic functions
Method, advisable-function-main: Private generic functions
Method, circular-advice-advice: Private generic functions
Method, circular-advice-function: Private generic functions
Method, documentation: Public standalone methods
Method, documentation: Public standalone methods
Method, function-being-converted: Private generic functions
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, not-an-advisable-function-function: Private generic functions

N
not-an-advisable-function-function: Private generic functions
not-an-advisable-function-function: Private generic functions

R
remove-advice: Public ordinary functions
remove-advice-all: Private ordinary functions
remove-advice-if: Private ordinary functions
remove-advice-if-not: Private ordinary functions
remove-after-advice-if: Private ordinary functions
remove-after-advice-if-not: Private ordinary functions
remove-around-advice-if: Private ordinary functions
remove-around-advice-if-not: Private ordinary functions
remove-before-advice-if: Private ordinary functions
remove-before-advice-if-not: Private ordinary functions
remove-nth: Private ordinary functions
remove-nth-advice: Public ordinary functions
remove-nth-advice-after: Private ordinary functions
remove-nth-advice-around: Private ordinary functions
remove-nth-advice-before: Private ordinary functions
replace-advice: Public ordinary functions
replace-advice-after: Private ordinary functions
replace-advice-around: Private ordinary functions
replace-advice-before: Private ordinary functions

W
when-let1: Private macros
with-gensyms: Private macros
with-implicit-conversion: Public macros