From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/elisp/documentation-basics.html | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 devdocs/elisp/documentation-basics.html (limited to 'devdocs/elisp/documentation-basics.html') diff --git a/devdocs/elisp/documentation-basics.html b/devdocs/elisp/documentation-basics.html new file mode 100644 index 00000000..b478e556 --- /dev/null +++ b/devdocs/elisp/documentation-basics.html @@ -0,0 +1,6 @@ +

Documentation Basics

A documentation string is written using the Lisp syntax for strings, with double-quote characters surrounding the text. It is, in fact, an actual Lisp string. When the string appears in the proper place in a function or variable definition, it serves as the function’s or variable’s documentation.

In a function definition (a lambda or defun form), the documentation string is specified after the argument list, and is normally stored directly in the function object. See Function Documentation. You can also put function documentation in the function-documentation property of a function name (see Accessing Documentation).

In a variable definition (a defvar form), the documentation string is specified after the initial value. See Defining Variables. The string is stored in the variable’s variable-documentation property.

Sometimes, Emacs does not keep documentation strings in memory. There are two such circumstances. Firstly, to save memory, the documentation for preloaded functions and variables (including primitives) is kept in a file named DOC, in the directory specified by doc-directory (see Accessing Documentation). Secondly, when a function or variable is loaded from a byte-compiled file, Emacs avoids loading its documentation string (see Docs and Compilation). In both cases, Emacs looks up the documentation string from the file only when needed, such as when the user calls C-h f (describe-function) for a function.

Documentation strings can contain special key substitution sequences, referring to key bindings which are looked up only when the user views the documentation. This allows the help commands to display the correct keys even if a user rearranges the default key bindings. See Keys in Documentation.

In the documentation string of an autoloaded command (see Autoload), these key-substitution sequences have an additional special effect: they cause C-h f on the command to trigger autoloading. (This is needed for correctly setting up the hyperlinks in the *Help* buffer.)

+

+ Copyright © 1990-1996, 1998-2022 Free Software Foundation, Inc.
Licensed under the GNU GPL license.
+ https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Basics.html +

+
-- cgit v1.2.3