Man or javadoc style documentation for generic lisp

Are there any generic lisp documents like javadoc, man or even popups like intellisense? I was just starting to learn general lisp and did not have enough manual memory.

I use emacs and slime - it has a tab, but it seems not very informative.

Thanks!

+2
source share
2 answers

Just in case, this question was to ask where the link is - there are several Hyperspecs available on the Internet. If you search Google for something like a "hyperspec function-name", there is a good chance that you will land on one of them.

http://clhs.lisp.se/Front/index.htm

http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/FrontMatter/index.html

eg.

Depending on your editor, you can usually configure it to display the contents of the hyperlink. With SLIME in Emacs, you can do Mx slime-hyperspec-lookup RET symbol-to-look-for

Another convenient tool is apropos - at startup (apropos "substring-in-the-symbol-name") you will get a list of all the characters corresponding to the "substring in the symbol-name".

SLIME itself provides good autocomplete. What can let you go is that by default the keys can be tied to what your system does not send to Emacs (e.g. M-TAB) in order to reinstall it on something else that you can do (in your .emacs file):

 (define-key lisp-mode-map (kbd "Cx .") 'slime-complete-symbol) (define-key lisp-mode-map (kbd "Cx /") 'slime-complete-form) (define-key lisp-mode-map (kbd "Cx ,") 'slime-fuzzy-complete-symbol) 

In addition, Emacs provides "lexical" completion on its own - if you press M- /, it will try to complete the word with a word with the same suffix - it works surprisingly well, especially if you need to enter long variables / functions :)

In addition, SLIME maps Cc Cd f to slime-describe-function-at-point and Cc Cd d to slime-describe-symbol-at-point and Cc Cv d to slime-describe-presentation-at-point .

Also ... something that appeared as a revelation to me after a while ... if you press RET while in the buffer containing the trace of the error stack, point to the entry in the stack, it will display the value of local variables inside the function at this level stack. If you then press RET when the point is on one of these variables, it will open a buffer that describes this variable.

+2
source

See manifest for batch documentation. Keep in mind that Common Lisp is intended to be used as a dynamic system and includes optional docstring slots in every declaration primitive it has. AFAIK, the standard way to get documentation for this function is to simply run (describe #'function-name-here) in repl (without # if you are looking for documentation about a symbol).

This will give you access to docstrings, as well as to lists of arguments (in the case of methods, you get a compilation of the description of common functions, as well as for each specific method).

Take a look at autocomplete-mode and possibly yasnippet for completions.

+1
source

Source: https://habr.com/ru/post/1494873/


All Articles