4

I am learning lisp and i was wondering if there were any built in help commands - ie: return help on a topic or command - like (defun /?)

thanks

2 Answers 2

9

The standard function describe can provide some information about objects in an implementation-specific way, e.g.

* (describe 'defun)
COMMON-LISP:DEFUN
  [symbol]

DEFUN names a macro:
  Lambda-list: (&ENVIRONMENT ENV NAME ARGS &BODY BODY)
  Documentation:
Define a function at top level.
  Source file: SYS:SRC;CODE;DEFBOOT.LISP

Common Lisp is described by a standard, ANSI Common Lisp, and that standard has been HTMLized and is available online. Its index can be used to look up the specification of a particular function, macro, special form, etc.

For a quick reference, try the CL quick reference.

I use http://l1sp.org/ for quick lookup as well.

Most CL environments have a key combination that will look things up in the HyperSpec, too. In SLIME, it's C-c C-d h.

7

Try these:

(documentation 'documentation 'function)
(describe 'documentation)
(apropos "documentation")

And see http://www.lispworks.com/documentation/HyperSpec/Front/index.htm for the official specification of Common Lisp. You can install a local HTML version of Common Lisp HyperSpec (CLHS).

If you use Emacs and SLIME (http://common-lisp.net/project/slime/), you can use meta-. to see the source where a piece of code is defined. Also see ETags (or ctags) to enable this feature in your own code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.