The form-fiddle Reference Manual

Table of Contents

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

The form-fiddle Reference Manual

This is the form-fiddle Reference Manual, version 1.1.0, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 03:54:39 2018 GMT+0.


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

1 Introduction

About Form-Fiddle

Often times I need to destructure a form definition in a macro. This is a set of simple utilities to help with that.

How To

There's individual functions to extract each part of a lambda-definition-form: function, name, qualifiers, lambda-list, body, declarations, docstring and the forms. You can get all in one with split-lambda-form, or directly as a binding macro with with-destructured-lambda-form.

(split-lambda-form '(defun lambda-body (lambda-form)
                      (cddr lambda-form)))

(with-destructured-lambda-form (:forms forms)
    '(defmacro foo (bar)
       (declare (ignore bar))
       "Testing macro!"
       (print "test!"))
  forms)

See Also


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

2 Systems

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


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

2.1 form-fiddle

Maintainer

Nicolas Hafner <shinmera@tymoon.eu>

Author

Nicolas Hafner <shinmera@tymoon.eu>

Home Page

https://github.com/Shinmera/form-fiddle

License

Artistic

Description

A collection of utilities to destructure lambda forms.

Version

1.1.0

Dependency

documentation-utils

Source

form-fiddle.asd (file)

Components

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

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 files   [Contents][Index]

3.1.1 form-fiddle.asd

Location

form-fiddle.asd

Systems

form-fiddle (system)


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

3.1.2 form-fiddle/package.lisp

Parent

form-fiddle (system)

Location

package.lisp

Packages

form-fiddle


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

3.1.3 form-fiddle/form-fiddle.lisp

Dependency

package.lisp (file)

Parent

form-fiddle (system)

Location

form-fiddle.lisp

Exported Definitions
Internal Definitions

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

3.1.4 form-fiddle/documentation.lisp

Dependency

form-fiddle.lisp (file)

Parent

form-fiddle (system)

Location

documentation.lisp


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

4 Packages

Packages are listed by definition order.


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

4.1 form-fiddle

Source

package.lisp (file)

Nickname

org.shirakumo.form-fiddle

Use List

common-lisp

Exported Definitions
Internal Definitions

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

5 Definitions

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


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

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: with-body-options (BODY OTHER-OPTIONS &rest OPTIONS) FORM &body BODY-FORMS

Destructures the body according to split-body-kargs.

OTHER-OPTIONS will be bound to contain all the options that occur in the body but were not explicitly requested in OPTIONS. BODY will be bound to the remaining body forms. Each option in OPTIONS can be either a symbol or a list of symbol and default. The symbol is automatically converted to a keyword to match against the body options.

Package

form-fiddle

Source

form-fiddle.lisp (file)

Macro: with-destructured-lambda-form (&key FUNCTION NAME QUALIFIERS LAMBDA-LIST DOCSTRING DECLARATIONS FORMS) EXPRESSION &body BODY

Destructures the given EXPRESSION into its lambda-form parts.

Package

form-fiddle

Source

form-fiddle.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: lambda-body LAMBDA-FORM

Returns all BODY forms of the lambda-form.

|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯v¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯| (function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)

Package

form-fiddle

Source

form-fiddle.lisp (file)

Function: lambda-declarations LAMBDA-FORM

Returns the DECLARATIONS of the lambda-form, if any.

v
(function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)

Package

form-fiddle

Source

form-fiddle.lisp (file)

Function: lambda-docstring LAMBDA-FORM

Returns the DOCSTRING of the lambda-form, if any.

v
(function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)

Package

form-fiddle

Source

form-fiddle.lisp (file)

Function: lambda-forms LAMBDA-FORM

Returns the actual body forms of the lambda-form, if any.

v (function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)

Package

form-fiddle

Source

form-fiddle.lisp (file)

Function: lambda-function LAMBDA-FORM

Returns the defining FUNCTION of the lambda-form.
v
(function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)

Package

form-fiddle

Source

form-fiddle.lisp (file)

Function: lambda-lambda-list LAMBDA-FORM

Returns the LAMBDA-LIST of the lambda-form.

v
(function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)

Package

form-fiddle

Source

form-fiddle.lisp (file)

Function: lambda-name LAMBDA-FORM

Returns the NAME of the lambda-form, if any.

v
(function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)

Package

form-fiddle

Source

form-fiddle.lisp (file)

Function: lambda-qualifiers LAMBDA-FORM

Returns the QUALIFIERS of the lambda-form.

v
(function [name] qualifier* lambda-list [[docstring? | declaration*]] form*)

Package

form-fiddle

Source

form-fiddle.lisp (file)

Function: split-body-options BODY

Parses the body into two separate lists of forms and options.
This is found in some expressions like in the clause body of RESTART-CASE.

BODY ::= OPTION* FORM*
OPTION ::= KEYWORD EXPRESSION

Package

form-fiddle

Source

form-fiddle.lisp (file)

Function: split-lambda-form LAMBDA-FORM

Returns all parts of a lambda-form as a list in the following order: FUNCTION NAME QUALIFIERS LAMBDA-LIST DOCSTRING DECLARATIONS FORMS

Package

form-fiddle

Source

form-fiddle.lisp (file)


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

5.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: declaration-p FORM

Returns T if the given thing is a declaration expression.

Package

form-fiddle

Source

form-fiddle.lisp (file)

Function: docstring-p FORM

Returns T if the given thing is a docstring.

Package

form-fiddle

Source

form-fiddle.lisp (file)

Function: removef PLIST &rest ARGS
Package

form-fiddle

Source

form-fiddle.lisp (file)


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

Appendix A Indexes


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

A.1 Concepts

Jump to:   F   L  
Index Entry  Section

F
File, Lisp, form-fiddle.asd: The form-fiddle<dot>asd file
File, Lisp, form-fiddle/documentation.lisp: The form-fiddle/documentation<dot>lisp file
File, Lisp, form-fiddle/form-fiddle.lisp: The form-fiddle/form-fiddle<dot>lisp file
File, Lisp, form-fiddle/package.lisp: The form-fiddle/package<dot>lisp file
form-fiddle.asd: The form-fiddle<dot>asd file
form-fiddle/documentation.lisp: The form-fiddle/documentation<dot>lisp file
form-fiddle/form-fiddle.lisp: The form-fiddle/form-fiddle<dot>lisp file
form-fiddle/package.lisp: The form-fiddle/package<dot>lisp file

L
Lisp File, form-fiddle.asd: The form-fiddle<dot>asd file
Lisp File, form-fiddle/documentation.lisp: The form-fiddle/documentation<dot>lisp file
Lisp File, form-fiddle/form-fiddle.lisp: The form-fiddle/form-fiddle<dot>lisp file
Lisp File, form-fiddle/package.lisp: The form-fiddle/package<dot>lisp file

Jump to:   F   L  

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

A.2 Functions

Jump to:   D   F   L   M   R   S   W  
Index Entry  Section

D
declaration-p: Internal functions
docstring-p: Internal functions

F
Function, declaration-p: Internal functions
Function, docstring-p: Internal functions
Function, lambda-body: Exported functions
Function, lambda-declarations: Exported functions
Function, lambda-docstring: Exported functions
Function, lambda-forms: Exported functions
Function, lambda-function: Exported functions
Function, lambda-lambda-list: Exported functions
Function, lambda-name: Exported functions
Function, lambda-qualifiers: Exported functions
Function, removef: Internal functions
Function, split-body-options: Exported functions
Function, split-lambda-form: Exported functions

L
lambda-body: Exported functions
lambda-declarations: Exported functions
lambda-docstring: Exported functions
lambda-forms: Exported functions
lambda-function: Exported functions
lambda-lambda-list: Exported functions
lambda-name: Exported functions
lambda-qualifiers: Exported functions

M
Macro, with-body-options: Exported macros
Macro, with-destructured-lambda-form: Exported macros

R
removef: Internal functions

S
split-body-options: Exported functions
split-lambda-form: Exported functions

W
with-body-options: Exported macros
with-destructured-lambda-form: Exported macros

Jump to:   D   F   L   M   R   S   W  

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

A.3 Variables


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

A.4 Data types

Jump to:   F   P   S  
Index Entry  Section

F
form-fiddle: The form-fiddle system
form-fiddle: The form-fiddle package

P
Package, form-fiddle: The form-fiddle package

S
System, form-fiddle: The form-fiddle system

Jump to:   F   P   S