diff options
author | Juri Linkov <juri@linkov.net> | 2020-03-20 01:21:57 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2020-03-20 01:21:57 +0200 |
commit | 7515252cce60de91fce19f5efa84d326f0b14ca5 (patch) | |
tree | cf8e2b64e0966cba97f0a5dba4602a1d1581b335 /lisp/tab-line.el | |
parent | d801d1d8ccae3d8c9ea3d55c27ae16cd28212734 (diff) | |
download | emacs-7515252cce60de91fce19f5efa84d326f0b14ca5.tar.gz emacs-7515252cce60de91fce19f5efa84d326f0b14ca5.tar.bz2 emacs-7515252cce60de91fce19f5efa84d326f0b14ca5.zip |
* 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.
Diffstat (limited to 'lisp/tab-line.el')
-rw-r--r-- | lisp/tab-line.el | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 53fa984caf6..eb279deab4c 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -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) + (force-mode-line-update)) :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) - tab-line-new-tab-choice) + tab-line-new-button-show + tab-line-new-button) (list tab-line-new-button))))) (defvar tab-line-auto-hscroll) |