Common Lisp Package: REPL-UTILITIES

README:

FUNCTION

Public

ARGLIST (FNAME)

Return the arglist for the given function name. Implementations taken from slime.

DE (&REST REST)

Shortening of describe. A Rob Warnock function.

DEPENDENCY-LOCATIONS (SYSTEM-NAME &OPTIONAL PRINT-SYSTEM-NAMES-P (OPERATION 'LOAD-OP))

Print the pathname of the system and of the systems needed to operation it. Operation should be a symbol naming an operation recognized by asfd:component-depends-on, e.g. 'asdf:load-op or 'asfd:test-op.

SHADOWED-IMPORT (SYMBOLS &OPTIONAL (PACKAGE *PACKAGE*) (PRINT-WHEN-SHADOWED-P T))

Import each symbol into PACKAGE, unless a symbol of the same name is present. If print-when-shadowed-p is true, print a message for each not-imported symbol indicating that it was not imported.

Private

ENSURE-UNQUOTED (FORM)

If form is quoted, remove one level of quoting. Otherwise return form. This is a useful for defining convenience for macros which may be passed a quoted or unquoted symbol.

Undocumented

DOC% (SYMBOL)

FIRST-LINE (STRING)

LOAD-SYSTEM-OR-PRINT (SYSTEM-DESIGNATOR &OPTIONAL CONTROL-STRING &REST FORMAT-ARGS)

SUMMARY% (&OPTIONAL (PACKAGE-DESIGNATOR *PACKAGE*))

TRACE-PACKAGE% (&OPTIONAL (PACKAGE *PACKAGE*) (INHERITEDP NIL))

MACRO

Public

BRING (PACKAGE &OPTIONAL (SHADOWING-IMPORT NIL))

Attempt to ql:quickload or asdf:load-system a system with the same name as package. Regardless of whether the load was successful import the package's exported symbols into the current package. If shadowing-import is nil, only the symbols which won't cause a symbol conflict are imported. After importing the package funcall each element of *bring-hooks* with the package as its argument. Expands to an EVAL-WHEN :compile-toplevel :load-toplevel :execute

DBGV ((&OPTIONAL (WHERE DEBUG) (STREAM '*STANDARD-OUTPUT*)) &BODY FORMS)

Print WHERE, execute FORMS, and print each form and its result to the STREAM.

DEFLEX (VAR VAL &OPTIONAL (DOC NIL DOCP))

Define a top level (global) lexical VAR with initial value VAL, which is assigned unconditionally as with DEFPARAMETER. If a DOC string is provided, it is attached to both the name |VAR| and the name *STORAGE-FOR-DEFLEX-VAR-|VAR|* as a documentation string of kind 'VARIABLE. The new VAR will have lexical scope and thus may be shadowed by LET bindings without affecting its dynamic (global) value.

DEV (PACKAGE)

Attempt to ql:quickload or asfd:load-system a system with the same name as package, then swap to the package regardless of whether the load was successful. Import repl-utilities exported symbols that don't cause symbol conflicts into the newly swapped to pacage. Mnemonic for develop. After swapping to the package map funcall over *dev-hooks*. Expands to an EVAL-WHEN :compile-toplevel :load-toplevel :execute

DOC (SYMBOL &REST IGNORED-ARGUMENTS)

Print any documentation for the symbol. Includes variable, function, type, compiler macro, method combination, and setf documentation.

EXCS (&OPTIONAL (PACKAGE *PACKAGE*))

Print the external symbols for which find-class is truthy.

EXFNS (&OPTIONAL (PACKAGE *PACKAGE*))

Print the external fboundp symbols of a package.

EXS (&OPTIONAL (PACKAGE *PACKAGE*))

Print the external symbols of package.

EXTS (&OPTIONAL (PACKAGE *PACKAGE*))

Print the external symbols which are type specifiers.

LEX (&REST ARGS)

Shortening of deflex: define a global lexical variable.

MAC (EXPR)

Bind *gensym-counter* to 0, Macroexpand-1 the form, pprint result. If expression starts with a quotation, unquotes it first.

NIC (PACKAGE-NAME NICK-SYMBOL)

Add an additional nickname to package. Expands to an EVAL-WHEN :compile-toplevel :load-toplevel :execute

README (&OPTIONAL (PACKAGE *PACKAGE*))

Print the documentation on the exported symbols of a package.

SUMMARY (&OPTIONAL (PACKAGE *PACKAGE*))

Print the exported symbols along with the first line of their docstrings.

TRACE-PACKAGE (&OPTIONAL (PACKAGE *PACKAGE*) (INHERITEDP NIL))

Trace all of the symbols in *package*. This won't attempt to trace any symbols in :cl

Private

FIRST-FORM (&REST FORMS)

Return the first form; useful when you want one of multiple possible conditionally read forms.

Undocumented

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

VARIABLE

Public

*BRING-HOOKS*

List of functions to be funcalled after a package is loaded with BRING. The functions are called with the package imported by bring as their only argument.

*DEV-HOOKS*

List of functions to be funcalled after a package is loaded with DEV. During execution of these functions *PACKAGE* is already set to the package being loaded, and the repl-utilities symbols which will be imported already are. The functions are called with no arguments.