Go to the first, previous, next, last section, table of contents.

Documentation Commands

As you edit Lisp code to be run in Emacs, the commands C-h f (describe-function) and C-h v (describe-variable) can be used to print documentation of functions and variables that you want to call. These commands use the minibuffer to read the name of a function or variable to document, and display the documentation in a window.

For extra convenience, these commands provide default arguments based on the code in the neighborhood of point. C-h f sets the default to the function called in the innermost list containing point. C-h v uses the symbol name around or adjacent to point as its default.

For Emacs Lisp code, you can also use Eldoc mode. This minor mode constantly displays in the echo area the argument list for the function being called at point. (In other words, it finds the function call that point is contained in, and displays the argument list of that function.) Eldoc mode applies in Emacs Lisp and Lisp Interaction modes only. Use the command M-x eldoc-mode to enable or disable this feature.

For C, Lisp, and other languages, you can use C-h C-i (info-lookup-symbol) to view the Info documentation for a symbol. You specify the symbol with the minibuffer; by default, it uses the symbol that appears in the buffer at point. The major mode determines where to look for documentation for the symbol--which Info files and which indices. You can also use M-x info-lookup-file to look for documentation for a file name.

You can read the "man page" for an operating system command, library function, or system call, with the M-x manual-entry command. It runs the man program to format the man page, and runs it asynchronously if your system permits, so that you can keep on editing while the page is being formatted. (MS-DOS and MS-Windows 3 do not permit asynchronous subprocesses, so on these systems you cannot edit while Emacs waits for man to exit.) The result goes in a buffer named `*Man topic*'. These buffers use a special major mode, Man mode, that facilitates scrolling and examining other manual pages. For details, type C-h m while in a man page buffer.

For a long man page, setting the faces properly can take substantial time. By default, Emacs uses faces in man pages if Emacs can display different fonts or colors. You can turn off use of faces in man pages by setting the variable Man-fontify-manpage-flag to nil.

If you insert the text of a man page into an Emacs buffer in some other fashion, you can use the command M-x Man-fontify-manpage to perform the same conversions that M-x manual-entry does.

Eventually the GNU project hopes to replace most man pages with better-organized manuals that you can browse with Info. See section Other Help Commands. Since this process is only partially completed, it is still useful to read manual pages.

Go to the first, previous, next, last section, table of contents.