From: Mauro Aranda <maurooaranda@gmail.com>
To: Stefan Kangas <stefankangas@gmail.com>, Gabriel <gabriel376@hotmail.com>
Cc: 59438@debbugs.gnu.org, Juri Linkov <juri@linkov.net>
Subject: bug#59438: 29.0.50; [PATCH] Make defvar's into defcustom's in tab-line
Date: Fri, 8 Sep 2023 07:43:36 -0300 [thread overview]
Message-ID: <3847fb38-8c3f-b3fd-673e-8030713c7b77@gmail.com> (raw)
In-Reply-To: <CADwFkmm=kpLwEdQkM2SOKdjwUe0REEm83+Uet2X6ZY_FYjadWA@mail.gmail.com>
On 7/9/23 18:07, Stefan Kangas wrote:
> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> Gabriel <gabriel376@hotmail.com> writes:
>>
>>> Please find attached a patch that proposes the following minor changes
>>> to tab-line. I can refactor the patch if we decide that some change are
>>> not worth or if it's better to split it into smaller patches.
>>>
>>> 1) Turn the following defvar's into defcustom's:
>>>
>>> - `tab-line-tabs-buffer-group-function'
>>> - `tab-line-tabs-buffer-group-sort-function'
>>> - `tab-line-tabs-buffer-groups-sort-function'
>>>
>>> 2) Add conditional around function call of
>>> `tab-line-tabs-buffer-groups-sort-function', in
>>> `tab-line-tabs-buffer-groups'. This guards against nil values, similar
>>> to how `tab-line-tabs-buffer-group-sort-function is handled, making the
>>> behavior more consistent across these two (similar) variables.
>>>
>>> Should we announce these "new" defcustom's in NEWS?
>>
>> Juri, thoughts?
>
> Ping. Does anyone have any comments?
I do have minor comments about the defcustom changes.
Gabriel <gabriel376@hotmail.com> writes:
>>From da1053e7211d8bb17769fe43650a9bcdd359aeab Mon Sep 17 00:00:00 2001
> From: Gabriel do Nascimento Ribeiro <gabriel376@hotmail.com>
> Date: Mon, 21 Nov 2022 06:17:49 -0300
> Subject: [PATCH 1/1] Make defvar's into defcustom's in tab-line
>
> * lisp/tab-line.el (tab-line-tabs-buffer-group-function)
> (tab-line-tabs-buffer-group-sort-function)
> (tab-line-tabs-buffer-groups-sort-function): Make into defcustom's.
> (Make defvar's into defcustom's in tab-line): Handle case when
> variable tab-line-tabs-buffer-groups-sort-function is nil.
> ---
> lisp/tab-line.el | 51 ++++++++++++++++++++++++++++--------------------
> 1 file changed, 30 insertions(+), 21 deletions(-)
>
> diff --git a/lisp/tab-line.el b/lisp/tab-line.el
> index 99a785ee3e..9b1c101718 100644
> --- a/lisp/tab-line.el
> +++ b/lisp/tab-line.el
> @@ -341,16 +341,26 @@ tab-line-tabs-mode-buffers
> (derived-mode-p mode)))
> (funcall
tab-line-tabs-buffer-list-function)))))
>
> -(defvar tab-line-tabs-buffer-group-function nil
> +(defcustom tab-line-tabs-buffer-group-function nil
> "Function to add a buffer to the appropriate group of tabs.
> -Takes a buffer as arg and should return a group name as a string.
> -If the return value is nil, the buffer should be filtered out.")
> +Takes a buffer as argument and should return a group name as a
> +string. If the return value is nil, the buffer should be
> + filtered out."
> + :type 'function
> + :group 'tab-line
> + :version "29.1")
Since the option can be nil, please add a choice type here.
> -(defvar tab-line-tabs-buffer-group-sort-function nil
> - "Function to sort buffers in a group.")
> +(defcustom tab-line-tabs-buffer-group-sort-function nil
> + "Function to sort buffers in a group."
> + :type 'function
> + :group 'tab-line
> + :version "29.1")
Same here.
> -(defvar tab-line-tabs-buffer-groups-sort-function #'string<
> - "Function to sort group names.")
> +(defcustom tab-line-tabs-buffer-groups-sort-function #'string<
> + "Function to sort group names."
> + :type 'function
> + :group 'tab-line
> + :version "29.1")
And version should be updated, I guess.
prev parent reply other threads:[~2023-09-08 10:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 9:25 bug#59438: 29.0.50; [PATCH] Make defvar's into defcustom's in tab-line Gabriel
2022-11-25 1:15 ` Stefan Kangas
2023-09-07 21:07 ` Stefan Kangas
2023-09-08 10:43 ` Mauro Aranda [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3847fb38-8c3f-b3fd-673e-8030713c7b77@gmail.com \
--to=maurooaranda@gmail.com \
--cc=59438@debbugs.gnu.org \
--cc=gabriel376@hotmail.com \
--cc=juri@linkov.net \
--cc=stefankangas@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.