coo.roles package

<< back to coo index

This package defines a few new roles that are helpful for lisp documentation.

Exported symbols:

Variables

*context-package*

If non-nil, the current package context. Influences the reading and printing of symbols by name-symbol and find-symbol-by-name.

Functions

find-symbol-by-name

(STR)

Search for the symbol named by str in the current context. If it's unqualified, look in *context-package*, then common-lisp then give up.

name-symbol

(SYMBOL)

Used for formatting names of symbols. Will take into account *context-package* if non-nil.

For example:

coo.roles> (name-symbol 'name-symbol)
"coo.roles::name-symbol"

coo.roles> (let ((*context-package* (find-package 'coo.roles)))
             (name-symbol 'name-symbol))
"name-symbol"

coo.roles> (name-symbol 'cl:list)
"common-lisp:list"

anchor-name-for-symbol

(SYMBOL)

Generates a url-safe name for symbol.

e.g. some-variable => "%2Asome-variable%2A"