summaryrefslogtreecommitdiff
path: root/devdocs/elisp/command-history.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/command-history.html
new repository
Diffstat (limited to 'devdocs/elisp/command-history.html')
-rw-r--r--devdocs/elisp/command-history.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/devdocs/elisp/command-history.html b/devdocs/elisp/command-history.html
new file mode 100644
index 00000000..c10cfdad
--- /dev/null
+++ b/devdocs/elisp/command-history.html
@@ -0,0 +1,15 @@
+ <h3 class="section">Command History</h3> <p>The command loop keeps a history of the complex commands that have been executed, to make it convenient to repeat these commands. A <em>complex command</em> is one for which the interactive argument reading uses the minibuffer. This includes any <kbd>M-x</kbd> command, any <kbd>M-:</kbd> command, and any command whose <code>interactive</code> specification reads an argument from the minibuffer. Explicit use of the minibuffer during the execution of the command itself does not cause the command to be considered complex. </p> <dl> <dt id="command-history">Variable: <strong>command-history</strong>
+</dt> <dd>
+<p>This variable’s value is a list of recent complex commands, each represented as a form to evaluate. It continues to accumulate all complex commands for the duration of the editing session, but when it reaches the maximum size (see <a href="minibuffer-history">Minibuffer History</a>), the oldest elements are deleted as new ones are added. </p> <div class="example"> <pre class="example">command-history
+⇒ ((switch-to-buffer "chistory.texi")
+ (describe-key "^X^[")
+ (visit-tags-table "~/emacs/src/")
+ (find-tag "repeat-complex-command"))
+</pre>
+</div> </dd>
+</dl> <p>This history list is actually a special case of minibuffer history (see <a href="minibuffer-history">Minibuffer History</a>), with one special twist: the elements are expressions rather than strings. </p> <p>There are a number of commands devoted to the editing and recall of previous commands. The commands <code>repeat-complex-command</code>, and <code>list-command-history</code> are described in the user manual (see <a href="https://www.gnu.org/software/emacs/manual/html_node/emacs/Repetition.html#Repetition">Repetition</a> in <cite>The GNU Emacs Manual</cite>). Within the minibuffer, the usual minibuffer history commands are available. </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/Command-History.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Command-History.html</a>
+ </p>
+</div>