Common Lisp Package: REASONABLE-UTILITIES.SYMBOL

Symbol manipulation utilities.

README:

FUNCTION

Public

ENSURE-KEYWORD

Make a keyword from OBJ according to FORMAT.

ENSURE-SYMBOL

Make a symbol in either PACKAGE or *PACKAGE* from OBJ according to FORMAT.

PACKAGE-EXTERNAL-SYMBOLS

List all symbols in a PACKAGE.

PACKAGE-SYMBOLS

List all symbols in a PACKAGE.

RE-EXPORT-SYMBOLS

Make the exported symbols in FROM-PACKAGE be also exported from TO-PACKAGE.

Private

MAKE-GENSYM-LIST

Return a list of LENGTH gensyms, using the second (optional, defaulting to 'G') argument.

MACRO

Public

ABBR (SHORT LONG &OPTIONAL LAMBDA-LIST)

Abbreviate LONG macro or function name as SHORT. If LAMBDA-LIST is present, also copy appropriate SETF-expander.

EVAL-ALWAYS (&BODY BODY)

Wrap BODY in eval-when with all keys (compile, load and execute) mentioned.

ONCE-ONLY (SPECS &BODY FORMS)

Evaluate FORMS with names rebound to temporary variables, ensuring that each is evaluated only once. Each SPEC must be either a NAME, or a (NAME INITFORM), with plain NAME using the named variable as initform. Example: CL-USER> (defmacro cons1 (x) (once-only (x) `(cons ,x ,x))) CL-USER> (let ((y 0)) (cons1 (incf y))) (1 . 1)

WITH-GENSYMS ((&REST NAMES) &BODY BODY)

Provide gensyms for given NAMES.

WITH-UNIQUE-NAMES ((&REST NAMES) &BODY BODY)

Provide gensyms for given NAMES.