Variable: read-extended-command-predicate

read-extended-command-predicate is a customizable variable defined in simple.el.gz.

Value

transient-command-completion-not-suffix-only-p

Documentation

Predicate to use to determine which commands to include when completing.

If it's nil, include all the commands. If it's a function, it will be called with two parameters: the symbol of the command and a buffer. The predicate should return non-nil if the command should be present when doing M-x TAB in that buffer.

This variable was added, or its default value changed, in Emacs 28.1.

Probably introduced at or before Emacs version 28.1.

Source Code

;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defcustom read-extended-command-predicate nil
  "Predicate to use to determine which commands to include when completing.
If it's nil, include all the commands.
If it's a function, it will be called with two parameters: the
symbol of the command and a buffer.  The predicate should return
non-nil if the command should be present when doing `M-x TAB'
in that buffer."
  :version "28.1"
  :group 'completion
  :type '(choice (const :tag "Don't exclude any commands" nil)
                 (const :tag "Exclude commands irrelevant to current buffer's mode"
                        command-completion-default-include-p)
                 (function :tag "Other function")))