all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#47117: 28.0.50; [PATCH] Update docstring of 'tab-line-tabs-function'
@ 2021-03-13  1:35 Gabriel
  2021-03-13 21:36 ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Gabriel @ 2021-03-13  1:35 UTC (permalink / raw)
  To: 47117

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

The user option 'tab-line-tabs-function' on tab-line.el does not mention
the possible value of 'tab-line-tabs-buffer-groups', which can difficult
the discoverability of this feature for users. This patch update its
docstring to mention the missing option, and adds a docstring to the
function of same name. Feel free to modify the proposed patch for an
improved and clearer docstring version.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-lisp-tab-line.el-Update-docstring-of-tab-line-tabs-f.patch --]
[-- Type: text/x-diff, Size: 1654 bytes --]

From 17036ccb9e6e2be23cb8db6c41a818e9225f07da Mon Sep 17 00:00:00 2001
From: Gabriel do Nascimento Ribeiro <gabriel.nascimento@nubank.com.br>
Date: Fri, 12 Mar 2021 22:28:06 -0300
Subject: [PATCH] lisp/tab-line.el: Update docstring of
 'tab-line-tabs-function'

(tab-line-tabs-function): Mention'tab-line-tabs-buffer-groups'
in the docstring.
(tab-line-tabs-buffer-groups): Add docstring.
---
 lisp/tab-line.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 903862a3e8..eb1921181b 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -294,7 +294,10 @@ tab-line-tabs-function
 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"
@@ -356,6 +359,9 @@ tab-line-tabs-buffer-group-name
           mode))))
 
 (defun 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'."
   (if (window-parameter nil 'tab-line-groups)
       (let* ((buffers (funcall tab-line-tabs-buffer-list-function))
              (groups
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-14  9:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-13  1:35 bug#47117: 28.0.50; [PATCH] Update docstring of 'tab-line-tabs-function' Gabriel
2021-03-13 21:36 ` Juri Linkov
2021-03-13 22:10   ` Gabriel
2021-03-14  9:13     ` Juri Linkov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.