summaryrefslogtreecommitdiff
path: root/lisp/tab-line.el
diff options
context:
space:
mode:
authorGabriel do Nascimento Ribeiro <gabriel.nascimento@nubank.com.br>2021-03-13 19:04:55 -0300
committerJuri Linkov <juri@linkov.net>2021-03-14 11:11:12 +0200
commit0a60e5d33c82803d68970c71a2e9ac9fcde5c2c6 (patch)
treefb195c949b17bbdbe8cdfc598921c5376a287947 /lisp/tab-line.el
parent0bfa9e78602a9c37c9ebd14bef43d15f6443d17c (diff)
downloademacs-0a60e5d33c82803d68970c71a2e9ac9fcde5c2c6.tar.gz
* 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.
Diffstat (limited to 'lisp/tab-line.el')
-rw-r--r--lisp/tab-line.el10
1 files changed, 9 insertions, 1 deletions
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