From 0a60e5d33c82803d68970c71a2e9ac9fcde5c2c6 Mon Sep 17 00:00:00 2001 From: Gabriel do Nascimento Ribeiro Date: Sat, 13 Mar 2021 19:04:55 -0300 Subject: [PATCH] * lisp/tab-line.el: Update docstring of 'tab-line-tabs-function' (bug#47117) (tab-line-tabs-function): Mention 'tab-line-tabs-buffer-groups' in the docstring. (tab-line-tabs-buffer-groups): Add docstring. --- lisp/tab-line.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/tab-line.el b/lisp/tab-line.el index c4b504aaad6..f2c49019b14 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -305,7 +305,10 @@ be displayed, or just a list of strings to display in the tab line. By default, use function `tab-line-tabs-window-buffers' that returns a list of buffers associated with the selected window. When `tab-line-tabs-mode-buffers', return a list of buffers -with the same major mode as the current buffer." +with the same major mode as the current buffer. +When `tab-line-tabs-buffer-groups', return a list of buffers +grouped either by `tab-line-tabs-buffer-group-function', when set, +or by `tab-line-tabs-buffer-groups'." :type '(choice (const :tag "Window buffers" tab-line-tabs-window-buffers) (const :tag "Same mode buffers" @@ -367,6 +370,11 @@ If the major mode's name string matches REGEXP, use GROUPNAME instead.") mode)))) (defun tab-line-tabs-buffer-groups () + "Return a list of tabs that should be displayed in the tab line. +By default return a list of buffers grouped by major mode, +according to `tab-line-tabs-buffer-groups'. +If non-nil, `tab-line-tabs-buffer-group-function' is used to +generate the group name." (if (window-parameter nil 'tab-line-groups) (let* ((buffers (funcall tab-line-tabs-buffer-list-function)) (groups -- 2.39.5