开发者

Does common lisp have any built in help like (? commandName)

I am learning lisp and i was wondering if there were any built in help commands - ie: return help on a topic or comma开发者_开发问答nd - like (defun /?)

thanks


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜