summaryrefslogtreecommitdiff
path: root/doc/lispref/commands.texi
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2021-02-14 13:56:53 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2021-02-14 13:56:53 +0100
commitc1ef7adeb649aa99a10c4bd3b6ce988b309da3cc (patch)
treeb03eb0219885c5c43f5ee45d77cb0fa24588e8fb /doc/lispref/commands.texi
parent2bfcd93e83d264e6b801e43bfd1a78e345b8221d (diff)
downloademacs-c1ef7adeb649aa99a10c4bd3b6ce988b309da3cc.tar.gz
emacs-c1ef7adeb649aa99a10c4bd3b6ce988b309da3cc.tar.bz2
emacs-c1ef7adeb649aa99a10c4bd3b6ce988b309da3cc.zip
Add 'read-extended-command-predicate'
* doc/emacs/m-x.texi (M-x): Document it. * doc/lispref/commands.texi (Interactive Call): Document it further. * lisp/simple.el (read-extended-command-predicate): New user option. (read-extended-command-predicate): Use it. (completion-in-mode-p): New function (the default predicate).
Diffstat (limited to 'doc/lispref/commands.texi')
-rw-r--r--doc/lispref/commands.texi9
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index d60745a825b..b3bcdf35c9f 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -773,6 +773,15 @@ part of the prompt.
@result{} t
@end group
@end example
+
+@vindex read-extended-command-predicate
+This command heeds the @code{read-extended-command-predicate}
+variable, which will (by default) filter out commands that are not
+applicable to the current major mode (or enabled minor modes).
+@code{read-extended-command-predicate} will be called with two
+parameters: The symbol that is to be included or not, and the current
+buffer. If should return non-@code{nil} if the command is to be
+included when completing.
@end deffn
@node Distinguish Interactive