summaryrefslogtreecommitdiff
path: root/devdocs/elisp/function-names.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
committerCraig Jennings <c@cjennings.net>2025-08-14 22:58:58 -0500
commit82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch)
tree158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/elisp/function-names.html
parent9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff)
downloaddotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz
dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/elisp/function-names.html')
-rw-r--r--devdocs/elisp/function-names.html6
1 files changed, 0 insertions, 6 deletions
diff --git a/devdocs/elisp/function-names.html b/devdocs/elisp/function-names.html
deleted file mode 100644
index 997eae46..00000000
--- a/devdocs/elisp/function-names.html
+++ /dev/null
@@ -1,6 +0,0 @@
- <h3 class="section">Naming a Function</h3> <p>A symbol can serve as the name of a function. This happens when the symbol’s <em>function cell</em> (see <a href="symbol-components">Symbol Components</a>) contains a function object (e.g., a lambda expression). Then the symbol itself becomes a valid, callable function, equivalent to the function object in its function cell. </p> <p>The contents of the function cell are also called the symbol’s <em>function definition</em>. The procedure of using a symbol’s function definition in place of the symbol is called <em>symbol function indirection</em>; see <a href="function-indirection">Function Indirection</a>. If you have not given a symbol a function definition, its function cell is said to be <em>void</em>, and it cannot be used as a function. </p> <p>In practice, nearly all functions have names, and are referred to by their names. You can create a named Lisp function by defining a lambda expression and putting it in a function cell (see <a href="function-cells">Function Cells</a>). However, it is more common to use the <code>defun</code> special form, described in the next section. See <a href="defining-functions">Defining Functions</a>. </p> <p>We give functions names because it is convenient to refer to them by their names in Lisp expressions. Also, a named Lisp function can easily refer to itself—it can be recursive. Furthermore, primitives can only be referred to textually by their names, since primitive function objects (see <a href="primitive-function-type">Primitive Function Type</a>) have no read syntax. </p> <p>A function need not have a unique name. A given function object <em>usually</em> appears in the function cell of only one symbol, but this is just a convention. It is easy to store it in several symbols using <code>fset</code>; then each of the symbols is a valid name for the same function. </p> <p>Note that a symbol used as a function name may also be used as a variable; these two uses of a symbol are independent and do not conflict. (This is not the case in some dialects of Lisp, like Scheme.) </p> <p>By convention, if a function’s symbol consists of two names separated by ‘<samp>--</samp>’, the function is intended for internal use and the first part names the file defining the function. For example, a function named <code>vc-git--rev-parse</code> is an internal function defined in <samp>vc-git.el</samp>. Internal-use functions written in C have names ending in ‘<samp>-internal</samp>’, e.g., <code>bury-buffer-internal</code>. Emacs code contributed before 2018 may follow other internal-use naming conventions, which are being phased out. </p><div class="_attribution">
- <p class="_attribution-p">
- Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
- <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Function-Names.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Function-Names.html</a>
- </p>
-</div>