summaryrefslogtreecommitdiff
path: root/doc/lispref
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/commands.texi33
-rw-r--r--doc/lispref/display.texi2
-rw-r--r--doc/lispref/functions.texi4
-rw-r--r--doc/lispref/markers.texi4
-rw-r--r--doc/lispref/sequences.texi2
-rw-r--r--doc/lispref/windows.texi2
6 files changed, 32 insertions, 15 deletions
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index 85376cc4598..8199ece1101 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -493,7 +493,10 @@ I/O.
Point and the mark, as two numeric arguments, smallest first. This is
the only code letter that specifies two successive arguments rather than
one. This will signal an error if the mark is not set in the buffer
-which is current when the command is invoked. No I/O.
+which is current when the command is invoked. If Transient Mark mode
+is turned on (@pxref{The Mark}) --- as it is by default --- and user
+option @code{mark-even-if-inactive} is @code{nil}, Emacs will signal
+an error even if the mark @emph{is} set, but is inactive. No I/O.
@item s
Arbitrary text, read in the minibuffer and returned as a string
@@ -597,16 +600,17 @@ Put them into three windows, selecting the last one."
@subsection Specifying Modes For Commands
Many commands in Emacs are general, and not tied to any specific mode.
-For instance, @kbd{M-x kill-region} can be used pretty in pretty much
-any mode that has editable text, and commands that display information
+For instance, @kbd{M-x kill-region} can be used in pretty much any
+mode that has editable text, and commands that display information
(like @kbd{M-x list-buffers}) can be used in pretty much any context.
Many other commands, however, are specifically tied to a mode, and
make no sense outside of that context. For instance, @code{M-x
-dired-diff} will just signal an error used outside of a dired buffer.
+dired-diff} will just signal an error if used outside of a Dired
+buffer.
Emacs therefore has a mechanism for specifying what mode (or modes) a
-command ``belong'' to:
+command ``belongs'' to:
@lisp
(defun dired-diff (...)
@@ -634,8 +638,8 @@ commands (if they aren't bound to any keys).
If using this extended @code{interactive} form isn't convenient
(because the code is supposed to work in older versions of Emacs that
-doesn't support the extended @code{interactive} form), the following
-can be used instead:
+don't support the extended @code{interactive} form), the following
+equivalent declaration (@pxref{Declare Form}) can be used instead:
@lisp
(declare (modes dired-mode))
@@ -657,10 +661,10 @@ call @code{kill-buffer}. This command will ``work'' from any mode,
but it is highly unlikely that anybody would actually want to use the
command outside the context of this special mode.
-Many modes have a set of different commands that start that start the
-mode in different ways, (e.g., @code{eww-open-in-new-buffer} and
+Many modes have a set of different commands that start the mode in
+different ways (e.g., @code{eww-open-in-new-buffer} and
@code{eww-open-file}). Commands like that should never be tagged as
-mode-specific, as then can be issued by the user from pretty much any
+mode-specific, as they can be issued by the user from pretty much any
context.
@node Generic Commands
@@ -847,6 +851,15 @@ non-@code{nil} if the command is to be included when completing in
that buffer.
@end deffn
+@deffn Command execute-extended-command-for-buffer prefix-argument
+This is like @code{execute-extended-command}, but limits the commands
+offered for completion to those commands that are of particular
+relevance to the current major mode (and enabled minor modes). This
+includes commands that are tagged with the modes (@pxref{Using
+Interactive}), and also commands that are bound to locally active
+keymaps.
+@end deffn
+
@node Distinguish Interactive
@section Distinguish Interactive Calls
@cindex distinguish interactive calls
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 93e935ccf86..131ad2d9c87 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -1997,7 +1997,7 @@ the beginning of the result if a multi-column character in
If @var{ellipsis} is non-@code{nil}, it should be a string which will
replace the end of @var{string} when it is truncated. In this case,
-more charcaters will be removed from @var{string} to free enough space
+more characters will be removed from @var{string} to free enough space
for @var{ellipsis} to fit within @var{width} columns. However, if
the display width of @var{string} is less than the display width of
@var{ellipsis}, @var{ellipsis} will not be appended to the result. If
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 1e3da8e3a5d..2a9b57f19f3 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -863,6 +863,10 @@ This function returns @var{argument} and has no side effects.
This function ignores any @var{arguments} and returns @code{nil}.
@end defun
+@defun always &rest arguments
+This function ignores any @var{arguments} and returns @code{t}.
+@end defun
+
Some functions are user-visible @dfn{commands}, which can be called
interactively (usually by a key sequence). It is possible to invoke
such a command exactly as though it was called interactively, by using
diff --git a/doc/lispref/markers.texi b/doc/lispref/markers.texi
index b39373f0727..80f79b67e52 100644
--- a/doc/lispref/markers.texi
+++ b/doc/lispref/markers.texi
@@ -609,8 +609,8 @@ the function @code{use-region-p} for that (@pxref{The Region}).
@defvarx deactivate-mark-hook
These normal hooks are run, respectively, when the mark becomes active
and when it becomes inactive. The hook @code{activate-mark-hook} is
-also run at the end of the command loop if the mark is active and it
-is possible that the region may have changed.
+also run when the region is reactivated, for instance after using a
+command that switches back to a buffer that has an active mark.
@ignore
This piece of command_loop_1, run unless deactivating the mark:
if (current_buffer != prev_buffer || MODIFF != prev_modiff)
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 0c74dbe2aa4..545fd408f88 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -609,7 +609,7 @@ returned value is a list.
(seq-map-indexed (lambda (elt idx)
(list idx elt))
'(a b c))
-@result{} ((0 a) (b 1) (c 2))
+@result{} ((0 a) (1 b) (2 c))
@end group
@end example
@end defun
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index f305d1a8ee8..c32d711f12a 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -2557,7 +2557,7 @@ frame visible and, unless @var{alist} contains an
This function tries to display @var{buffer} by finding a window
that is displaying a buffer in a given mode.
-If @var{alist} contains a @code{mode} entry, its value specifes a
+If @var{alist} contains a @code{mode} entry, its value specifies a
major mode (a symbol) or a list of major modes. If @var{alist}
contains no @code{mode} entry, the current major mode of @var{buffer}
is used instead. A window is a candidate if it displays a buffer