* lisp/tab-bar.el: Show full tab names on tooltips (bug#65554).

(tab-bar--format-tab): Use tab names for :help strings.
It's useful to see original tab names when the tab-bar displays names
truncated by tab-bar-auto-width, etc.
(tab-bar-format-menu-bar): Fix string case for consistency with other items.
This commit is contained in:
Juri Linkov 2023-08-28 09:52:36 +03:00
parent 2134fd9f27
commit 123060841d

View file

@ -874,7 +874,7 @@ Used by `tab-bar-format-menu-bar'."
(defun tab-bar-format-menu-bar ()
"Produce the Menu button for the tab bar that shows the menu bar."
`((menu-bar menu-item ,tab-bar-menu-bar-button
tab-bar-menu-bar :help "Menu Bar")))
tab-bar-menu-bar :help "Menu bar")))
(defun tab-bar-format-history ()
"Produce back and forward buttons for the tab bar.
@ -901,13 +901,13 @@ You can hide these buttons by customizing `tab-bar-format' and removing
menu-item
,(funcall tab-bar-tab-name-format-function tab i)
ignore
:help "Current tab")))
:help ,(alist-get 'name tab))))
(t
`((,(intern (format "tab-%i" i))
menu-item
,(funcall tab-bar-tab-name-format-function tab i)
,(alist-get 'binding tab)
:help "Click to visit tab"))))
:help ,(alist-get 'name tab)))))
(when (alist-get 'close-binding tab)
`((,(if (eq (car tab) 'current-tab) 'C-current-tab
(intern (format "C-tab-%i" i)))