The cl-advice Reference Manual

Next: , Previous: , Up: (dir)   [Contents][Index]

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 Thu Sep 15 03:30:52 2022 GMT+0.

Table of Contents


1 Introduction

#+TITLE: CL-ADVICE

A lightweight and portable system for advising functions in Common Lisp.

* Description
  ~CL-ADVICE~ implements a new function type which carries with it slots for
  before, around, and after advice. Functions can be defined as advisable,
  existing functions not within a locked package can be converted to advisable
  functions, and advisable functions can be converted to regular functions.

** Types of Advice
   Pieces of advice are functions which get called before, after, or around the
   main function. Generally speaking, its a good idea to define advice functions
   as named functions and add it as a symbol and not a function object. This
   makes removing advice easier, and allows the advised function to use the new
   definition should the advice function be recompiled. Additionally, while
   installing anonymous functions as advice is allowed, removing anonymous
   function advice requires knowing where in the advice list it lies, or holding
   a reference to the anonymous function object.
*** Before and After Advice
    Before and After advice must have an argument list that is compatible with
    the main function. Two argument lists are considered compatible if they can
    both be applied to the same arguments. These advice functions are looped
    through and called in order.
*** Around Advice
    Around advice must take the next function to be called as its first
    argument, and all following arguments must be compatible with the main
    functions argument list. Around advice is unique in that it has control over
    whether or not the next function will be called. The next function may be
    the main function, or the next piece of around advice.
    
* Usage
  This system is used primarily through the functions ~make-advisable~,
  ~defun-advisable~, ~add-advice~, ~replace-advice~, and ~remove-advice~. For
  more information, see the docstrings of the functions and macros exported in
  =package.lisp=.

** Making Functions Advisable
   When making functions advisable, the original function object is wrapped in a
   funcallable object which has a dispatch function as its main function. This
   conversion is done through the function ~make-advisable~. By default,
   functions are converted to be advisable implicitly, through the function
   ~ensure-advisable-function~. This is controlled by the dynamic variable
   ~*allow-implicit-conversion*~, and can be enabled or disabled for a body of
   code through the macro ~with-implicit-conversion~. If conversion

*** ~MAKE-ADVISABLE~
    This function creates an advisable function object and, if the function to
    make advisable is a symbol, rebinds the symbol-function to this new
    function. In addition it defines a dispatcher function for the advisable
    function object. 
    
    When defining the dispatch function all care will be taken to preserve the
    original argument list, however this isnt guaranteed. The function
    ~make-advisable~ has a compiler macro defined for it which will define the
    dispatcher function with correct arguments if they are provided. However a
    compiler macro may not always be called. For this reason the argument
    ~force-use-arguments~ is provided which forces generation of a dispach
    function with the correct argument list by using ~eval~.
    
** Redefining functions
   The macro ~defun-advisable~ copies existing advice if and only if the
   function has the same argument list (as compared by ~equal~).

** Example: ~TRACE~
   We can implement ~trace~ in terms of ~:around~ advice like so:
#+BEGIN_SRC lisp
  (defpackage :tracer
    (:use :cl :cl-advice))

  (in-package :tracer)

  (defun make-simple-tracer (&optional (sym 'unknown-function))
    (let ((inc 0))
      (lambda (next-fn &rest args)
        (let ((string (make-string inc :initial-element #\space)))
          (format t "~&~A~A: Calling ~A with arguments ~A~%"
                  string inc sym args)
          (incf inc)
          (let ((result (apply next-fn args)))
            (decf inc)
            (format t "~&~A~A: ~A returned ~A~%"
                    string inc sym result)
            result)))))

  (defun-advisable fib (n)
    (if (< n 2)
        n
        (+ (fib (- n 1)) (fib (- n 2)))))

  (add-advice :around 'fib (make-simple-tracer 'fib))
#+END_SRC

   The result of this is that when ~fib~ is called, the following will be
   printed to standard output:
#+BEGIN_SRC lisp
  TRACER> (fib 1)
   0: Calling FIB with arguments (1)
   0: FIB returned 1
  1
  TRACER> (fib 5)
   0: Calling FIB with arguments (5)
    1: Calling FIB with arguments (4)
     2: Calling FIB with arguments (3)
      3: Calling FIB with arguments (2)
       4: Calling FIB with arguments (1)
       4: FIB returned 1
       4: Calling FIB with arguments (0)
       4: FIB returned 0
      3: FIB returned 1
      3: Calling FIB with arguments (1)
      3: FIB returned 1
     2: FIB returned 2
     2: Calling FIB with arguments (2)
      3: Calling FIB with arguments (1)
      3: FIB returned 1
      3: Calling FIB with arguments (0)
      3: FIB returned 0
     2: FIB returned 1
    1: FIB returned 3
    1: Calling FIB with arguments (3)
     2: Calling FIB with arguments (2)
      3: Calling FIB with arguments (1)
      3: FIB returned 1
      3: Calling FIB with arguments (0)
      3: FIB returned 0
     2: FIB returned 1
     2: Calling FIB with arguments (1)
     2: FIB returned 1
    1: FIB returned 2
   0: FIB returned 5
  5 (3 bits, #x5, #o5, #b101)
#+END_SRC

* Documentation
  
** Function ~ADVISABLE-FUNCTION-P~
   *advisable-function-p* /function/

   Returns T if /function/ is an advisable function. 
   
   - Arguments and Values
     - /function/ - a object

** Function ~MAKE-ADVISABLE~
   *make-advisable* /symbol/ &key /arguments force-use-arguments/

   Converts a function to an advisable function. If /symbol/ is a symbol, then
   the function denoted by it is converted and the ~symbol-function~ of /symbol/
   is set to the new advisable function. If /symbol/ is a function object it is
   converted to an advisable function and returned.

   When /arguments/ is provided and the call is being compiled, a compiler macro
   will generate a dispatcher function with this argument list. If the call is
   not being compiled or the compiler macro is not triggered then a generic
   dispatcher argument list is used.

   When /force-use-arguments/ is T and the compiler macro is not triggered,
   ~eval~ is used to generate a dispatcher function that uses /arguments/ for
   its argument list. 

   - Arguments and Values
     - /symbol/ - a symbol denoting a function or a function object
     - /arguments/ - the argument list of /symbol/
     - /force-use-arguments/ - When T force the usage of /arguments/ for the
       advisable function dispatcher function. 

** Function ~MAKE-UNADVISABLE~
   *make-unadvisable* /symbol/

   Convert an advisable function to be unadvisable. If /symbol/ is a symbol then
   the function referred to by /symbol/ is converted to be unadvisable and
   /symbol/ has its ~symbol-function~ rebound to this function. If /symbol/ is a
   function object the unadvisable function is returned.

   - Arguments and Values
     - /symbol/ - a symbol or function to convert to be unadvisable

** Function ~ENSURE-ADVISABLE-FUNCTION~
   *ensure-advisable-function* /symbol/ &optional /arguments force-use-arguments/

   Returns an advisable function or signals an error. If /symbol/ denotes an
   unadvisable function and ~*allow-implicit-conversion*~ is T then /symbol/ is
   converted via ~make-advisable~. If ~*allow-implicit-conversion*~ is NIL, then
   an error of type ~implicit-conversion-to-advisable-function~ is signalled
   with two restarts established around it. These restarts are ~allow-conversion~,
   which converts the function, and ~return-value~, which takes a value to
   return. When called interactively the return-value restart reads and
   evaluates a value from the user.

   When implicitly converting a function to be advisable, /arguments/ and
   /force-use-arguments/ are passed to ~make-advisable~.

   - Arguments and Values
     - /symbol/ - a symbol or function object
     - /arguments/ - a argument list
     - /force-use-arguments/ - a true or false value

** Function ~ENSURE-UNADVISABLE-FUNCTION~
   *ensure-unadvisable-function* /symbol/

   Calls ~make-unadvisable~ on /symbol/ and return an unadvisable function.

   - Arguments and Values
     - /symbol/ - a symbol or function object 
   
** Macro ~WITH-IMPLICIT-CONVERSION~
   *with-implicit-conversion* (/allow-or-not/ &optional /abort-on-implicit-conversion return-on-abort/) &body /body/
   
   Binds the variable ~*allow-implicit-conversion*~ to T or NIL based upon
   whether /allow-or-not/ is ~eql~ to ~:allowed~, where /allow-or-not/ is
   evaluated at runtime. If /abort-on-implicit-conversion/ is true (at
   macroexpansion time) then if ~implicit-conversion-to-advisable-function~ is
   signalled then control leaves /body/ immediately, and /return-on-abort/ is
   returned.

** Macro ~ADVISABLE-LAMBDA~
   *advisable-lambda* /argslist/ &body /body/

   Functions the same as ~lambda~, but returns an advisable function object.

   - Arguments and Values
     - /argslist/ - a function argument list
     - /body/ - A function body

** Macro ~DEFUN-ADVISABLE~
   *defun-advisable* /name argslist/ &body /body/

   Functions the same as ~defun~ but defines an advisable function.
   
   - Arguments and Values
     - /name/ - an unquoted symbol denoting the name for the function
     - /argslist/ - a function argument list
     - /body/ - A function body   

** Dynamic Variable ~*ALLOW-IMPLICIT-CONVERSION*~
   Variable with the default value of T. When T, allow
   ~ensure-advisable-function~ to implicitly convert unadvisable functions to be
   advisable. When NIL, signal an error when attempting to implicitly convert an
   unadvisable function. 

** Function ~ADD-ADVICE~
   *add-advice* /where function advice-function/ &key /allow-duplicates test from-end/

   Advise /function/ with /advice-function/. If /allow-duplicates/ is NIL, test
   for duplicates using /test/.

   - Arguments and Values
     - /where/ - a keyword denoting the kind of advice /advice-function/
       is. Must be one of ~:before~, ~:after~, or ~:around~.
     - /function/ - a symbol or function object
     - /advice-function/ - the advice function to install.
     - /allow-duplicates/ - a true or false value. When true duplicate advice is
       allowed.
     - /test/ - a function to compare pieces of advice. Used when
       /allow-duplicates/ is NIL
     - /from-end/ - Determines where to add the advice in its appropriate advice
       list. When T add the advice at the end of the advice list, when NIL add
       it at the beginning. 

** Function ~REPLACE-ADVICE~
   *replace-advice* /where function old-advice new-advice/ &key /test if-not-found/

   Replace a piece of advice.

   - Arguments and Values
     - /where/ - a symbol denoting the type of advice to replace, one of
       ~:before~, ~:around~, or ~:after~
     - /function/ - the function to replace the advice for
     - /old-advice/ - the advice to replace
     - /new-advice/ - the advice to replace /old-advice/ with
     - /test/ - a function to compare advice
     - /if-not-found/ - A keyword denoting what to do if /old-advice/ isnt
       found. Must be one of ~:prepend~, ~:append~, or NIL. 

** Function ~LIST-ADVICE~
   *list-advice* /fn/ &key /type print/

   Lists advice for /fn/.

   - Arguments and Values
     - /fn/ - a function to print advice for
     - /type/ - a keyword denoting what kind of advice to list. Must be one of
       ~:all~, ~:before~, ~:around~, or ~:after~.
     - /print/ - when true print all advice to standard output.

** Function ~REMOVE-ADVICE~
   *remove-advice* /type fn advice/ &key /test/

   Remove /advice/ from /fn/.

   - Arguments and Values
     - /type/ - a keyword denoting which advice list to remove /advice/
       from. Must be one of ~:before~, ~:around~, or ~:after~.
     - /fn/ - a symbol or function object
     - /advice/ - the piece of advice to remove. Must be a symbol, function, or
       the keyword ~:all~. 
     - /test/ - a function to compare pieces of advice

** Function ~REMOVE-NTH-ADVICE~
   *remove-nth-advice* /type fn nth/

   Remove the /nth/ element of advice from /type/ advice list for /fn/. 

   - Arguments and Values
     - /type/ - a keyword denoting which advice list to remove the /nth/
       from. Must be one of ~:before~, ~:after~, or ~:around~.
     - /fn/ - the function to remove the advice from
     - /nth/ - the element to remove


2 Systems

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


Previous: , Up: Systems   [Contents][Index]

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.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp   [Contents][Index]

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.


Previous: , Up: Lisp   [Contents][Index]

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.


Previous: , Up: Packages   [Contents][Index]

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.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Public Interface


Next: , Previous: , Up: Public Interface   [Contents][Index]

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


Next: , Previous: , Up: Internals   [Contents][Index]

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.


Next: , Previous: , Up: Internals   [Contents][Index]

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.


Next: , Previous: , Up: Internals   [Contents][Index]

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.


Next: , Previous: , Up: Internals   [Contents][Index]

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


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts


Next: , Previous: , Up: Indexes   [Contents][Index]

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

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