Commit 7515252c authored by Juri Linkov's avatar Juri Linkov

* lisp/tab-line.el (tab-line-new-button-show): New defcustom.

* lisp/tab-line.el (tab-line-format-template): Use tab-line-new-button-show.
(tab-line-new-tab-choice): Remove choice 'nil' with "No button".
(tab-line-separator): Add docstring.
parent d801d1d8
Pipeline #5054 passed with stage
in 55 minutes and 46 seconds
......@@ -142,11 +142,19 @@
(defcustom tab-line-new-tab-choice t
"Defines what to show in a new tab.
If t, display a selection menu with all available buffers.
If the value is a function, call it with no arguments.
If nil, don't show the new tab button."
If the value is a function, call it with no arguments."
:type '(choice (const :tag "Buffer menu" t)
(function :tag "Function")
(const :tag "No button" nil))
(function :tag "Function"))
:group 'tab-line
:version "27.1")
(defcustom tab-line-new-button-show t
"If non-nil, show the \"New tab\" button in the tab line."
:type 'boolean
:initialize 'custom-initialize-default
:set (lambda (sym val)
(set-default sym val)
:group 'tab-line
:version "27.1")
......@@ -211,7 +219,8 @@ If nil, don't show it at all."
'help-echo "Click to scroll right")
"Button for scrolling horizontally to the right.")
(defvar tab-line-separator nil)
(defvar tab-line-separator nil
"String that delimits tabs.")
(defcustom tab-line-tab-name-function #'tab-line-tab-name-buffer
......@@ -455,7 +464,8 @@ variable `tab-line-tabs-function'."
(if hscroll (nthcdr (truncate hscroll) strings) strings)
(list separator)
(when (and (eq tab-line-tabs-function #'tab-line-tabs-window-buffers)
(list tab-line-new-button)))))
(defvar tab-line-auto-hscroll)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment