summaryrefslogtreecommitdiff
path: root/devdocs/elisp/abbrev-files.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/abbrev-files.html
new repository
Diffstat (limited to 'devdocs/elisp/abbrev-files.html')
-rw-r--r--devdocs/elisp/abbrev-files.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/devdocs/elisp/abbrev-files.html b/devdocs/elisp/abbrev-files.html
new file mode 100644
index 00000000..c1d24e8a
--- /dev/null
+++ b/devdocs/elisp/abbrev-files.html
@@ -0,0 +1,18 @@
+ <h3 class="section">Saving Abbrevs in Files</h3> <p>A file of saved abbrev definitions is actually a file of Lisp code. The abbrevs are saved in the form of a Lisp program to define the same abbrev tables with the same contents. Therefore, you can load the file with <code>load</code> (see <a href="how-programs-do-loading">How Programs Do Loading</a>). However, the function <code>quietly-read-abbrev-file</code> is provided as a more convenient interface. Emacs automatically calls this function at startup. </p> <p>User-level facilities such as <code>save-some-buffers</code> can save abbrevs in a file automatically, under the control of variables described here. </p> <dl> <dt id="abbrev-file-name">User Option: <strong>abbrev-file-name</strong>
+</dt> <dd><p>This is the default file name for reading and saving abbrevs. By default, Emacs will look for <samp>~/.emacs.d/abbrev_defs</samp>, and, if not found, for <samp>~/.abbrev_defs</samp>; if neither file exists, Emacs will create <samp>~/.emacs.d/abbrev_defs</samp>. </p></dd>
+</dl> <dl> <dt id="quietly-read-abbrev-file">Function: <strong>quietly-read-abbrev-file</strong> <em>&amp;optional filename</em>
+</dt> <dd>
+<p>This function reads abbrev definitions from a file named <var>filename</var>, previously written with <code>write-abbrev-file</code>. If <var>filename</var> is omitted or <code>nil</code>, the file specified in <code>abbrev-file-name</code> is used. </p> <p>As the name implies, this function does not display any messages. </p>
+</dd>
+</dl> <dl> <dt id="save-abbrevs">User Option: <strong>save-abbrevs</strong>
+</dt> <dd><p>A non-<code>nil</code> value for <code>save-abbrevs</code> means that Emacs should offer to save abbrevs (if any have changed) when files are saved. If the value is <code>silently</code>, Emacs saves the abbrevs without asking the user. <code>abbrev-file-name</code> specifies the file to save the abbrevs in. The default value is <code>t</code>. </p></dd>
+</dl> <dl> <dt id="abbrevs-changed">Variable: <strong>abbrevs-changed</strong>
+</dt> <dd><p>This variable is set non-<code>nil</code> by defining or altering any abbrevs (except system abbrevs). This serves as a flag for various Emacs commands to offer to save your abbrevs. </p></dd>
+</dl> <dl> <dt id="write-abbrev-file">Command: <strong>write-abbrev-file</strong> <em>&amp;optional filename</em>
+</dt> <dd><p>Save all abbrev definitions (except system abbrevs), for all abbrev tables listed in <code>abbrev-table-name-list</code>, in the file <var>filename</var>, in the form of a Lisp program that when loaded will define the same abbrevs. Tables that do not have any abbrevs to save are omitted. If <var>filename</var> is <code>nil</code> or omitted, <code>abbrev-file-name</code> is used. This function returns <code>nil</code>. </p></dd>
+</dl><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/Abbrev-Files.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Abbrev-Files.html</a>
+ </p>
+</div>