I'm using clozure common lisp. Is there a common lisp equivalent of the unix man
command or something analgous?
Asked
Active
Viewed 300 times
2

FrankS101
- 2,112
- 6
- 26
- 40

Kinnard Hockenhull
- 2,790
- 5
- 27
- 34
-
4The best source for standard functions is the [HyperSpec](http://www.lispworks.com/documentation/HyperSpec/Front/). If you're using Emacs+SLIME, you can use "C-c C-d h" to look up functions in it. Personally I like to have Emacs configured to use an offline copy (for instant page load) of the hyperspec in Eww (works well in text-mode too). – jkiiski Mar 03 '16 at 07:17
-
Possible duplicate of [How to see docstrings and other symbol information in Common Lisp REPL?](http://stackoverflow.com/questions/5093513/how-to-see-docstrings-and-other-symbol-information-in-common-lisp-repl) – sds May 04 '16 at 13:56
2 Answers
5
Start with describe
.
You might also want to consider documentation
, but that is lower level.

sds
- 58,617
- 29
- 161
- 278
-
1Don't forget the very useful (and sharing the same name as the similar command line tool) [**apropos**](http://www.lispworks.com/documentation/HyperSpec/Body/f_apropo.htm) – Joshua Taylor Mar 05 '16 at 02:18
4
As jkiiski commented you, Hyperspec is the best online documentation of standard functions for Common Lisp. You can download it for offline use here.
If you also want to document your own code, you can use either:
(defun simple-function (a b)
"Documentation of a simple function"
(+ a b))
or this:
(defun simple-function (a b)
(:documentation "Documentation of a simple function")
(+ a b))
as sds suggested, you can access the docstring by:
(describe #'simple-function)
or in an interactive way with:
(inspect #'simple-function)
A good SO answer about Common Lisp documentation can be found here.
-
Minor nit: the documentation [_has_ to be a string](http://www.lispworks.com/documentation/HyperSpec/Body/m_defun.htm), not a list prefixed by the `:documentation` keyword. – agam Jan 28 '17 at 00:17