diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 561365bb48..5d990ac184 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -33,7 +33,8 @@ (eval-when-compile (require 'cl-lib) - (require 'seq)) + (require 'seq) + (require 'icons)) (defgroup tab-bar nil @@ -521,6 +522,17 @@ tab-bar-new-button-show (defvar tab-bar-new-button " + " "Button for creating a new tab.") +(define-icon tab-bar-new-icon nil + `((image "tabs/new.xpm" + :margin ,tab-bar-button-margin + :ascent center) + (emoji "➕") + (symbol "+") + (text " + " :face tab-bar-tab)) + "Icon for creating a new tab." + :version "29.1" + :help-echo "New tab") + (defcustom tab-bar-close-button-show t "Defines where to show the close tab button. If t, show the close tab button on all tabs. @@ -905,8 +925,8 @@ tab-bar-format-tabs-groups (defun tab-bar-format-add-tab () "Button to add a new tab." - (when (and tab-bar-new-button-show tab-bar-new-button) - `((add-tab menu-item ,tab-bar-new-button tab-bar-new-tab + (when (and tab-bar-new-button-show) + `((add-tab menu-item ,(icon-string 'tab-bar-new-icon) tab-bar-new-tab :help "New tab")))) (defun tab-bar-format-align-right ()