Variable: tab-line-tabs-buffer-group-function

tab-line-tabs-buffer-group-function is a customizable variable defined in tab-line.el.gz.

Value

tab-line-tabs-buffer-group-by-mode

Documentation

Function to add a buffer to the appropriate group of tabs.

Takes a buffer as argument and should return a group name as a string. If the return value is nil, the buffer has no group, so "No group" is displayed instead of a group name and the buffer is not grouped together with other buffers. If the value is tab-line-tabs-buffer-group-by-mode, use mode-to-group mappings in tab-line-tabs-buffer-groups(var)/tab-line-tabs-buffer-groups(fun) to group by major mode. If the value is tab-line-tabs-buffer-group-by-project use the project name as a group name.

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

Probably introduced at or before Emacs version 30.1.

Source Code

;; Defined in /usr/src/emacs/lisp/tab-line.el.gz
(defcustom tab-line-tabs-buffer-group-function
  #'tab-line-tabs-buffer-group-by-mode
  "Function to add a buffer to the appropriate group of tabs.
Takes a buffer as argument and should return a group name as a string.
If the return value is nil, the buffer has no group, so \"No group\"
is displayed instead of a group name and the buffer is not grouped
together with other buffers.
If the value is `tab-line-tabs-buffer-group-by-mode',
use mode-to-group mappings in `tab-line-tabs-buffer-groups'
to group by major mode.  If the value is
`tab-line-tabs-buffer-group-by-project' use the project name
as a group name."
  :type '(choice (const :tag "Group by mode"
                        tab-line-tabs-buffer-group-by-mode)
                 (const :tag "Group by project name"
                        tab-line-tabs-buffer-group-by-project)
                 (function :tag "Custom function"))
  :initialize 'custom-initialize-default
  :set (lambda (sym val)
         (set-default sym val)
         (tab-line-force-update t))
  :group 'tab-line
  :version "30.1")