[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0a60e5d 2/2: * lisp/tab-line.el: Update docstring of 'tab-line-ta
From: |
Juri Linkov |
Subject: |
master 0a60e5d 2/2: * lisp/tab-line.el: Update docstring of 'tab-line-tabs-function' (bug#47117) |
Date: |
Sun, 14 Mar 2021 05:11:52 -0400 (EDT) |
branch: master
commit 0a60e5d33c82803d68970c71a2e9ac9fcde5c2c6
Author: Gabriel do Nascimento Ribeiro <gabriel.nascimento@nubank.com.br>
Commit: Juri Linkov <juri@linkov.net>
* 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 c4b504a..f2c4901 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