Variable: tab-first-completion

tab-first-completion is a customizable variable defined in indent.el.gz.

Value

nil

Documentation

Governs the behavior of TAB completion on the first press of the key.

When nil, complete. When eol, only complete if point is at the end of a line. When word, complete unless the next character has word syntax (according to syntax-after). When word-or-paren, complete unless the next character is part of a word or a parenthesis. When word-or-paren-or-punct, complete unless the next character is part of a word, parenthesis, or punctuation. Typing TAB a second time always results in completion.

This variable has no effect unless tab-always-indent is complete.

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

View in manual

Probably introduced at or before Emacs version 28.1.

Source Code

;; Defined in /usr/src/emacs/lisp/indent.el.gz
(defcustom tab-first-completion nil
  "Governs the behavior of TAB completion on the first press of the key.
When nil, complete.  When `eol', only complete if point is at the
end of a line.  When `word', complete unless the next character
has word syntax (according to `syntax-after').  When
`word-or-paren', complete unless the next character is part of a
word or a parenthesis.  When `word-or-paren-or-punct', complete
unless the next character is part of a word, parenthesis, or
punctuation.  Typing TAB a second time always results in
completion.

This variable has no effect unless `tab-always-indent' is `complete'."
  :group 'indent
  :type '(choice
          (const :tag "Always complete" nil)
          (const :tag "Only complete at the end of a line" eol)
          (const :tag "Unless looking at a word" word)
          (const :tag "Unless at a word or parenthesis" word-or-paren)
          (const :tag "Unless at a word, parenthesis, or punctuation."
                 word-or-paren-or-punct))
  :version "28.1")