The cl-who Reference Manual

This is the cl-who Reference Manual, version 1.1.4, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sat Dec 03 20:52:18 2022 GMT+0.

Table of Contents


1 Systems

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


1.1 cl-who

(X)HTML generation macros

License

BSD

Version

1.1.4

Source

cl-who.asd.

Child Components

2 Files

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


2.1 Lisp


2.1.1 cl-who/cl-who.asd

Source

cl-who.asd.

Parent Component

cl-who (system).

ASDF Systems

cl-who.


2.1.2 cl-who/packages.lisp

Source

cl-who.asd.

Parent Component

cl-who (system).

Packages

cl-who.


2.1.3 cl-who/specials.lisp

Dependency

packages.lisp (file).

Source

cl-who.asd.

Parent Component

cl-who (system).

Public Interface
Internals

2.1.4 cl-who/util.lisp

Dependency

specials.lisp (file).

Source

cl-who.asd.

Parent Component

cl-who (system).

Public Interface
Internals

2.1.5 cl-who/who.lisp

Dependency

util.lisp (file).

Source

cl-who.asd.

Parent Component

cl-who (system).

Public Interface
Internals

3 Packages

Packages are listed by definition order.


3.1 cl-who

Source

packages.lisp.

Nickname

who

Use List

common-lisp.

Public Interface
Internals

4 Definitions

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


4.1 Public Interface


4.1.1 Special variables

Special Variable: *attribute-quote-char*

Quote character for attributes.

Package

cl-who.

Source

specials.lisp.

Special Variable: *downcase-tokens-p*

If NIL, a keyword symbol representing a tag or attribute name will not be automatically converted to lowercase. If T, the tag and attribute name will be converted to lowercase only if it is in the same case. This is useful when one needs to output case sensitive XML.

Package

cl-who.

Source

specials.lisp.

Special Variable: *empty-attribute-syntax*

Set this to t to enable attribute minimization (also called ’boolean attributes’, or ’empty attribute syntax’ according to the w3 html standard). In XHTML attribute minimization is forbidden, and all attributes must have a value. Thus in XHTML boolean attributes must be defined as <input disabled=’disabled’ />. In HTML5 boolean attributes can be defined as <input disabled>

Package

cl-who.

Source

specials.lisp.

Special Variable: *escape-char-p*

Used by ESCAPE-STRING to test whether a character should be escaped.

Package

cl-who.

Source

specials.lisp.

Special Variable: *html-empty-tag-aware-p*

Set this to NIL to if you want to use CL-WHO as a strict XML generator. Otherwise, CL-WHO will only write empty tags listed in *HTML-EMPTY-TAGS* as <tag/> (XHTML mode) or <tag> (SGML mode and HTML5 mode). For all other tags, it will always generate <tag></tag>.

Package

cl-who.

Source

specials.lisp.

Special Variable: *html-empty-tags*

The list of HTML tags that should be output as empty tags. See *HTML-EMPTY-TAG-AWARE-P*.

Package

cl-who.

Source

specials.lisp.

Special Variable: *html-no-indent-tags*

The list of HTML tags that should disable indentation inside them. The initial value is a list containing only :PRE and :TEXTAREA.

Package

cl-who.

Source

specials.lisp.

Special Variable: *prologue*

This is the first line that’ll be printed if the :PROLOGUE keyword argument is T

Package

cl-who.

Source

specials.lisp.


4.1.2 Macros

Macro: with-html-output ((var &optional stream &rest rest &key prologue indent) &body body)

Transform the enclosed BODY consisting of HTML as s-expressions into Lisp code to write the corresponding HTML as strings to VAR - which should either hold a stream or which’ll be bound to STREAM if supplied.

Package

cl-who.

Source

who.lisp.

Macro: with-html-output-to-string ((var &optional string-form &key prologue indent) &body body)

Transform the enclosed BODY consisting of HTML as s-expressions into Lisp code which creates the corresponding HTML as a string.

Package

cl-who.

Source

who.lisp.


4.1.3 Ordinary functions

Function: conc (&rest string-list)

Concatenates all arguments which should be string into one string.

Package

cl-who.

Source

who.lisp.

Function: convert-attributes (attr-list)

Helper function for CONVERT-TAG-TO-STRING-LIST which converts the alist ATTR-LIST of attributes into a list of strings and/or Lisp forms.

Package

cl-who.

Source

who.lisp.

Function: escape-char (char &key test)

Returns an escaped version of the character CHAR if CHAR satisfies the predicate TEST. Always returns a string.

Package

cl-who.

Source

util.lisp.

Function: escape-char-all (char)

Escapes characters which aren’t in the 7-bit ASCII character set.

Package

cl-who.

Source

util.lisp.

Function: escape-char-iso-8859-1 (char)

Escapes characters that aren’t defined in ISO-8859-9.

Package

cl-who.

Source

util.lisp.

Function: escape-char-minimal (char)

Escapes only #<, #>, and #& characters.

Package

cl-who.

Source

util.lisp.

Function: escape-char-minimal-plus-quotes (char)

Like ESCAPE-CHAR-MINIMAL but also escapes quotes.

Package

cl-who.

Source

util.lisp.

Function: escape-string (string &key test)

Escape all characters in STRING which pass TEST. This function is not guaranteed to return a fresh string. Note that you can pass NIL for STRING which’ll just be returned.

Package

cl-who.

Source

util.lisp.

Function: escape-string-all (string)

Escapes all characters in STRING which aren’t in the 7-bit ASCII character set.

Package

cl-who.

Source

util.lisp.

Function: escape-string-iso-8859-1 (string)

Escapes all characters in STRING which aren’t defined in ISO-8859-1.

Package

cl-who.

Source

util.lisp.

Function: escape-string-minimal (string)

Escapes only #<, #>, and #& in STRING.

Package

cl-who.

Source

util.lisp.

Function: escape-string-minimal-plus-quotes (string)

Like ESCAPE-STRING-MINIMAL but also escapes quotes.

Package

cl-who.

Source

util.lisp.

Function: html-mode ()

Returns the current HTML mode. :SGML for (SGML-)HTML, :XML for XHTML and :HTML5 for HTML5 (HTML syntax).

Package

cl-who.

Source

who.lisp.

Function: (setf html-mode) ()

Sets the output mode to XHTML or (SGML-)HTML. MODE can be :SGML for HTML, :XML for XHTML or :HTML5 for HTML5 (HTML syntax).

Package

cl-who.

Source

who.lisp.


4.1.4 Generic functions

Generic Function: convert-tag-to-string-list (tag attr-list body body-fn)

Used by PROCESS-TAG to convert ‘HTML’ into a list
of strings. TAG is a keyword symbol naming the outer tag, ATTR-LIST is an alist of its attributes (the car is the attribute’s name as a keyword, the cdr is its value), BODY is the tag’s body, and BODY-FN is a function which should be applied to BODY. The function must return a list of strings or Lisp forms.

Package

cl-who.

Source

who.lisp.

Methods
Method: convert-tag-to-string-list (tag attr-list body body-fn)

The standard method which is not specialized. The idea is that you can use EQL specializers on the first argument.


4.2 Internals


4.2.1 Constants

Constant: +newline+

Used for indentation.

Package

cl-who.

Source

specials.lisp.

Constant: +spaces+

Used for indentation.

Package

cl-who.

Source

specials.lisp.


4.2.2 Special variables

Special Variable: *empty-tag-end*

End of an empty tag. Default is XML style.

Package

cl-who.

Source

specials.lisp.

Special Variable: *html-mode*

:SGML for (SGML-)HTML, :XML (default) for XHTML, :HTML5 for HTML5.

Package

cl-who.

Source

specials.lisp.

Special Variable: *hyperdoc-base-uri*
Package

cl-who.

Source

who.lisp.

Special Variable: *indent*

Whether to insert line breaks and indent. Also controls amount of indentation dynamically.

Package

cl-who.

Source

specials.lisp.


4.2.3 Macros

Macro: defconstant (name value &optional doc)

Make sure VALUE is evaluated only once (to appease SBCL & clasp).

Package

cl-who.

Source

specials.lisp.

Macro: n-spaces (n)

A string with N spaces - used by indentation.

Package

cl-who.

Source

util.lisp.

Macro: with-rebinding (bindings &body body)

WITH-REBINDING ( { var | (var prefix) }* ) form*

Evaluates a series of forms in the lexical environment that is formed by adding the binding of each VAR to a fresh, uninterned symbol, and the binding of that fresh, uninterned symbol to VAR’s original value, i.e., its value in the current lexical environment.

The uninterned symbol is created as if by a call to GENSYM with the string denoted by PREFIX - or, if PREFIX is not supplied, the string denoted by VAR - as argument.

The forms are evaluated in order, and the values of all but the last are discarded (that is, the body is an implicit PROGN).

Package

cl-who.

Source

util.lisp.

Macro: with-unique-names ((&rest bindings) &body body)

Syntax: WITH-UNIQUE-NAMES ( { var | (var x) }* ) declaration* form*

Executes a series of forms with each VAR bound to a fresh, uninterned symbol. The uninterned symbol is as if returned by a call to GENSYM with the string denoted by X - or, if X is not supplied, the string denoted by VAR - as argument.

The variable bindings created are lexical unless special declarations are specified. The scopes of the name bindings and declarations do not include the Xs.

The forms are evaluated in order, and the values of all but the last are discarded (that is, the body is an implicit PROGN).

Package

cl-who.

Source

util.lisp.


4.2.4 Ordinary functions

Function: extract-declarations (forms)

Given a FORM, the declarations - if any - will be extracted
from the head of the FORM, and will return two values the declarations, and the remaining of FORM

Package

cl-who.

Source

util.lisp.

Function: hyperdoc-lookup (symbol type)
Package

cl-who.

Source

who.lisp.

Function: iso-8859-1-escape-char-p (char)

Helper function for the ESCAPE-FOO-ISO-8859-1 functions to determine whether CHAR must be escaped.

Package

cl-who.

Source

util.lisp.

Function: maybe-downcase (symbol)
Package

cl-who.

Source

util.lisp.

Function: minimal-escape-char-p (char)

Helper function for the ESCAPE-FOO-MINIMAL functions to determine whether CHAR must be escaped.

Package

cl-who.

Source

util.lisp.

Function: minimal-plus-quotes-escape-char-p (char)

Helper function for the ESCAPE-FOO-MINIMAL-PLUS-QUOTES functions to determine whether CHAR must be escaped.

Package

cl-who.

Source

util.lisp.

Function: non-7bit-ascii-escape-char-p (char)

Helper function for the ESCAPE-FOO-ISO-8859-1 functions to determine whether CHAR must be escaped.

Package

cl-who.

Source

util.lisp.

Function: process-tag (sexp body-fn)

Returns a string list corresponding to the ‘HTML’ (in CL-WHO syntax) in SEXP. Uses the generic function CONVERT-TO-STRING-LIST internally. Utility function used by TREE-TO-TEMPLATE.

Package

cl-who.

Source

who.lisp.

Function: same-case-p (string)

Test if all characters of a string are in the same case.

Package

cl-who.

Source

util.lisp.

Function: string-list-to-string (string-list)

Concatenates a list of strings to one string.

Package

cl-who.

Source

who.lisp.

Function: tree-to-commands (tree stream &key prologue indent)
Package

cl-who.

Source

who.lisp.

Function: tree-to-template (tree)

Transforms an HTML tree into an intermediate format - mainly a flattened list of strings. Utility function used by TREE-TO-COMMANDS-AUX.

Package

cl-who.

Source

who.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   D   E   F   G   H   I   M   N   P   S   T   W  
Index Entry  Section

(
(setf html-mode): Public ordinary functions

C
conc: Public ordinary functions
convert-attributes: Public ordinary functions
convert-tag-to-string-list: Public generic functions
convert-tag-to-string-list: Public generic functions

D
defconstant: Private macros

E
escape-char: Public ordinary functions
escape-char-all: Public ordinary functions
escape-char-iso-8859-1: Public ordinary functions
escape-char-minimal: Public ordinary functions
escape-char-minimal-plus-quotes: Public ordinary functions
escape-string: Public ordinary functions
escape-string-all: Public ordinary functions
escape-string-iso-8859-1: Public ordinary functions
escape-string-minimal: Public ordinary functions
escape-string-minimal-plus-quotes: Public ordinary functions
extract-declarations: Private ordinary functions

F
Function, (setf html-mode): Public ordinary functions
Function, conc: Public ordinary functions
Function, convert-attributes: Public ordinary functions
Function, escape-char: Public ordinary functions
Function, escape-char-all: Public ordinary functions
Function, escape-char-iso-8859-1: Public ordinary functions
Function, escape-char-minimal: Public ordinary functions
Function, escape-char-minimal-plus-quotes: Public ordinary functions
Function, escape-string: Public ordinary functions
Function, escape-string-all: Public ordinary functions
Function, escape-string-iso-8859-1: Public ordinary functions
Function, escape-string-minimal: Public ordinary functions
Function, escape-string-minimal-plus-quotes: Public ordinary functions
Function, extract-declarations: Private ordinary functions
Function, html-mode: Public ordinary functions
Function, hyperdoc-lookup: Private ordinary functions
Function, iso-8859-1-escape-char-p: Private ordinary functions
Function, maybe-downcase: Private ordinary functions
Function, minimal-escape-char-p: Private ordinary functions
Function, minimal-plus-quotes-escape-char-p: Private ordinary functions
Function, non-7bit-ascii-escape-char-p: Private ordinary functions
Function, process-tag: Private ordinary functions
Function, same-case-p: Private ordinary functions
Function, string-list-to-string: Private ordinary functions
Function, tree-to-commands: Private ordinary functions
Function, tree-to-template: Private ordinary functions

G
Generic Function, convert-tag-to-string-list: Public generic functions

H
html-mode: Public ordinary functions
hyperdoc-lookup: Private ordinary functions

I
iso-8859-1-escape-char-p: Private ordinary functions

M
Macro, defconstant: Private macros
Macro, n-spaces: Private macros
Macro, with-html-output: Public macros
Macro, with-html-output-to-string: Public macros
Macro, with-rebinding: Private macros
Macro, with-unique-names: Private macros
maybe-downcase: Private ordinary functions
Method, convert-tag-to-string-list: Public generic functions
minimal-escape-char-p: Private ordinary functions
minimal-plus-quotes-escape-char-p: Private ordinary functions

N
n-spaces: Private macros
non-7bit-ascii-escape-char-p: Private ordinary functions

P
process-tag: Private ordinary functions

S
same-case-p: Private ordinary functions
string-list-to-string: Private ordinary functions

T
tree-to-commands: Private ordinary functions
tree-to-template: Private ordinary functions

W
with-html-output: Public macros
with-html-output-to-string: Public macros
with-rebinding: Private macros
with-unique-names: Private macros


A.3 Variables

Jump to:   *   +  
C   S  
Index Entry  Section

*
*attribute-quote-char*: Public special variables
*downcase-tokens-p*: Public special variables
*empty-attribute-syntax*: Public special variables
*empty-tag-end*: Private special variables
*escape-char-p*: Public special variables
*html-empty-tag-aware-p*: Public special variables
*html-empty-tags*: Public special variables
*html-mode*: Private special variables
*html-no-indent-tags*: Public special variables
*hyperdoc-base-uri*: Private special variables
*indent*: Private special variables
*prologue*: Public special variables

+
+newline+: Private constants
+spaces+: Private constants

C
Constant, +newline+: Private constants
Constant, +spaces+: Private constants

S
Special Variable, *attribute-quote-char*: Public special variables
Special Variable, *downcase-tokens-p*: Public special variables
Special Variable, *empty-attribute-syntax*: Public special variables
Special Variable, *empty-tag-end*: Private special variables
Special Variable, *escape-char-p*: Public special variables
Special Variable, *html-empty-tag-aware-p*: Public special variables
Special Variable, *html-empty-tags*: Public special variables
Special Variable, *html-mode*: Private special variables
Special Variable, *html-no-indent-tags*: Public special variables
Special Variable, *hyperdoc-base-uri*: Private special variables
Special Variable, *indent*: Private special variables
Special Variable, *prologue*: Public special variables