The modularize-hooks Reference Manual

This is the modularize-hooks Reference Manual, version 1.0.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed May 15 06:18:07 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 modularize-hooks

Generic hooks and triggers extension for modularize.

Maintainer

Yukari Hafner <>

Author

Yukari Hafner <>

Home Page

https://Shinmera.github.io/modularize-hooks/

Source Control

(GIT https://github.com/Shinmera/modularize-hooks.git)

Bug Tracker

https://github.com/Shinmera/modularize-hooks/issues

License

zlib

Version

1.0.2

Dependencies
  • modularize (system).
  • closer-mop (system).
  • trivial-arguments (system).
  • lambda-fiddle (system).
Source

modularize-hooks.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 modularize-hooks/modularize-hooks.asd

Source

modularize-hooks.asd.

Parent Component

modularize-hooks (system).

ASDF Systems

modularize-hooks.


3.1.2 modularize-hooks/package.lisp

Source

modularize-hooks.asd.

Parent Component

modularize-hooks (system).

Packages

modularize-hooks.


3.1.3 modularize-hooks/toolkit.lisp

Dependency

package.lisp (file).

Source

modularize-hooks.asd.

Parent Component

modularize-hooks (system).

Internals

function-lambda-matches (function).


3.1.4 modularize-hooks/hooks.lisp

Dependency

toolkit.lisp (file).

Source

modularize-hooks.asd.

Parent Component

modularize-hooks (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 modularize-hooks

Source

package.lisp.

Nicknames
  • org.shirakumo.radiance.lib.modularize.hooks
  • hooks
Use List
  • common-lisp.
  • lambda-fiddle.
  • modularize.
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 Macros

Macro: define-hook (name args &optional documentation)

Defines a new hook on which triggers can be defined.
The name should be a symbol from the module that the hook should belong to.

Package

modularize-hooks.

Source

hooks.lisp.

Macro: define-hook-switch (on off args)
Package

modularize-hooks.

Source

hooks.lisp.

Macro: define-trigger (hook args &body body)

Defines a new trigger on the hook.
A trigger can either accept no arguments or it has to match the hook in its arguments list. The name of the trigger defaults to the *PACKAGE*. If you want to have multiple triggers for the same hook in the same package, use a list of the following structure as the HOOK argument: (hook trigger-name hook-module)

Package

modularize-hooks.

Source

hooks.lisp.


5.1.2 Ordinary functions

Function: dehookify (&optional module)

Returns the module to one that is not capable of hooks.

In essence this merely removes all functions from the hooks package and deletes it.

Package

modularize-hooks.

Source

hooks.lisp.

Function: hook (name &optional module error)
Package

modularize-hooks.

Source

hooks.lisp.

Function: (setf hook) (name &optional module)
Package

modularize-hooks.

Source

hooks.lisp.

Function: hookify (&optional module)

Turns the module into one capable of hooks.

In essence this merely defines a new package with a matching name.

Package

modularize-hooks.

Source

hooks.lisp.

Function: list-hooks (&optional module)
Package

modularize-hooks.

Source

hooks.lisp.

Function: remove-hook (name &optional module)

Removes the hook as named.

Package

modularize-hooks.

Source

hooks.lisp.

Function: remove-trigger (hook &optional ident module)

Attempts to remove the trigger from the hook.

Package

modularize-hooks.

Source

hooks.lisp.

Function: trigger (hook &rest args)

Calls all triggers registered on the hook with the given arguments.

Package

modularize-hooks.

Source

hooks.lisp.


5.1.3 Generic functions

Generic Reader: arglist (object)
Package

modularize-hooks.

Methods
Reader Method: arglist ((hook hook))

automatically generated reader method

Source

hooks.lisp.

Target Slot

arglist.

Generic Writer: (setf arglist) (object)
Package

modularize-hooks.

Methods
Writer Method: (setf arglist) ((hook hook))

automatically generated writer method

Source

hooks.lisp.

Target Slot

arglist.

Generic Reader: docstring (object)
Package

modularize-hooks.

Methods
Reader Method: docstring ((hook hook))

automatically generated reader method

Source

hooks.lisp.

Target Slot

docstring.

Generic Writer: (setf docstring) (object)
Package

modularize-hooks.

Methods
Writer Method: (setf docstring) ((hook hook))

automatically generated writer method

Source

hooks.lisp.

Target Slot

docstring.

Generic Reader: name (object)
Package

modularize-hooks.

Methods
Reader Method: name ((hook hook))

automatically generated reader method

Source

hooks.lisp.

Target Slot

name.

Generic Writer: (setf name) (object)
Package

modularize-hooks.

Methods
Writer Method: (setf name) ((hook hook))

automatically generated writer method

Source

hooks.lisp.

Target Slot

name.


5.1.4 Standalone methods

Method: (setf documentation) ((hook hook) (doc-type (eql t)))
Source

hooks.lisp.

Method: documentation ((hook hook) (doc-type (eql t)))
Source

hooks.lisp.

Method: print-object ((hook hook) stream)
Source

hooks.lisp.


5.1.5 Classes

Class: hook
Package

modularize-hooks.

Source

hooks.lisp.

Direct subclasses

sticky-hook.

Direct methods
Direct Default Initargs
InitargValue
:name(error name required.)
:arglistnil
:docstringnil
Direct slots
Slot: name
Initargs

:name

Readers

name.

Writers

(setf name).

Slot: arglist
Initargs

:arglist

Readers

arglist.

Writers

(setf arglist).

Slot: triggers
Initform

(make-hash-table :test (quote eql))

Readers

triggers.

Writers

(setf triggers).

Slot: docstring
Initargs

:docstring

Readers

docstring.

Writers

(setf docstring).

Class: sticky-hook
Package

modularize-hooks.

Source

hooks.lisp.

Direct superclasses

hook.

Direct methods
Direct slots
Slot: stuck-args
Readers

stuck-args.

Writers

(setf stuck-args).


5.2 Internals


5.2.1 Ordinary functions

Function: enlist (a &rest args)
Package

modularize-hooks.

Source

hooks.lisp.

Function: function-lambda-matches (cur act)

Returns T if the function matches the lambda-list in arguments.
As a secondary value it returns a reason as to why it may have failed the test.

Package

modularize-hooks.

Source

toolkit.lisp.


5.2.2 Generic functions

Generic Function: find-trigger (name hook)
Package

modularize-hooks.

Methods
Method: find-trigger (name (hook hook))
Source

hooks.lisp.

Generic Function: (setf find-trigger) (name hook)
Package

modularize-hooks.

Methods
Method: (setf find-trigger) :after (name (hook sticky-hook))
Source

hooks.lisp.

Method: (setf find-trigger) (name (hook hook))
Source

hooks.lisp.

Method: (setf find-trigger) (name (hook hook))
Source

hooks.lisp.

Generic Function: run-triggers (hook args)
Package

modularize-hooks.

Methods
Method: run-triggers :after ((hook sticky-hook) args)
Source

hooks.lisp.

Method: run-triggers ((hook hook) args)
Source

hooks.lisp.

Generic Reader: stuck-args (object)
Package

modularize-hooks.

Methods
Reader Method: stuck-args ((sticky-hook sticky-hook))

automatically generated reader method

Source

hooks.lisp.

Target Slot

stuck-args.

Generic Writer: (setf stuck-args) (object)
Package

modularize-hooks.

Methods
Writer Method: (setf stuck-args) ((sticky-hook sticky-hook))

automatically generated writer method

Source

hooks.lisp.

Target Slot

stuck-args.

Generic Reader: triggers (object)
Package

modularize-hooks.

Methods
Reader Method: triggers ((hook hook))

automatically generated reader method

Source

hooks.lisp.

Target Slot

triggers.

Generic Writer: (setf triggers) (object)
Package

modularize-hooks.

Methods
Writer Method: (setf triggers) ((hook hook))

automatically generated writer method

Source

hooks.lisp.

Target Slot

triggers.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   D   E   F   G   H   L   M   N   P   R   S   T  
Index Entry  Section

(
(setf arglist): Public generic functions
(setf arglist): Public generic functions
(setf docstring): Public generic functions
(setf docstring): Public generic functions
(setf documentation): Public standalone methods
(setf find-trigger): Private generic functions
(setf find-trigger): Private generic functions
(setf find-trigger): Private generic functions
(setf find-trigger): Private generic functions
(setf hook): Public ordinary functions
(setf name): Public generic functions
(setf name): Public generic functions
(setf stuck-args): Private generic functions
(setf stuck-args): Private generic functions
(setf triggers): Private generic functions
(setf triggers): Private generic functions

A
arglist: Public generic functions
arglist: Public generic functions

D
define-hook: Public macros
define-hook-switch: Public macros
define-trigger: Public macros
dehookify: Public ordinary functions
docstring: Public generic functions
docstring: Public generic functions
documentation: Public standalone methods

E
enlist: Private ordinary functions

F
find-trigger: Private generic functions
find-trigger: Private generic functions
Function, (setf hook): Public ordinary functions
Function, dehookify: Public ordinary functions
Function, enlist: Private ordinary functions
Function, function-lambda-matches: Private ordinary functions
Function, hook: Public ordinary functions
Function, hookify: Public ordinary functions
Function, list-hooks: Public ordinary functions
Function, remove-hook: Public ordinary functions
Function, remove-trigger: Public ordinary functions
Function, trigger: Public ordinary functions
function-lambda-matches: Private ordinary functions

G
Generic Function, (setf arglist): Public generic functions
Generic Function, (setf docstring): Public generic functions
Generic Function, (setf find-trigger): Private generic functions
Generic Function, (setf name): Public generic functions
Generic Function, (setf stuck-args): Private generic functions
Generic Function, (setf triggers): Private generic functions
Generic Function, arglist: Public generic functions
Generic Function, docstring: Public generic functions
Generic Function, find-trigger: Private generic functions
Generic Function, name: Public generic functions
Generic Function, run-triggers: Private generic functions
Generic Function, stuck-args: Private generic functions
Generic Function, triggers: Private generic functions

H
hook: Public ordinary functions
hookify: Public ordinary functions

L
list-hooks: Public ordinary functions

M
Macro, define-hook: Public macros
Macro, define-hook-switch: Public macros
Macro, define-trigger: Public macros
Method, (setf arglist): Public generic functions
Method, (setf docstring): Public generic functions
Method, (setf documentation): Public standalone methods
Method, (setf find-trigger): Private generic functions
Method, (setf find-trigger): Private generic functions
Method, (setf find-trigger): Private generic functions
Method, (setf name): Public generic functions
Method, (setf stuck-args): Private generic functions
Method, (setf triggers): Private generic functions
Method, arglist: Public generic functions
Method, docstring: Public generic functions
Method, documentation: Public standalone methods
Method, find-trigger: Private generic functions
Method, name: Public generic functions
Method, print-object: Public standalone methods
Method, run-triggers: Private generic functions
Method, run-triggers: Private generic functions
Method, stuck-args: Private generic functions
Method, triggers: Private generic functions

N
name: Public generic functions
name: Public generic functions

P
print-object: Public standalone methods

R
remove-hook: Public ordinary functions
remove-trigger: Public ordinary functions
run-triggers: Private generic functions
run-triggers: Private generic functions
run-triggers: Private generic functions

S
stuck-args: Private generic functions
stuck-args: Private generic functions

T
trigger: Public ordinary functions
triggers: Private generic functions
triggers: Private generic functions