(tab-bar-format-history): Don't use this recently added variable
because now it's possible to customize the option 'tab-bar-format'
to remove 'tab-bar-format-history' from it that gives the same result.
(tab-bar-tabs, tab-bar-select-tab, tab-bar-new-tab-to):
Use tab-bar--current-tab-make instead of tab-bar--current-tab.
(tab-bar--tab): Add arg 'frame' to tab-bar--current-tab-find.
(tab-bar--current-tab, tab-bar--current-tab-make): Move most of body
from the former to the latter, thus reverting tab-bar--current-tab
to its previous behavior.
https://lists.gnu.org/archive/html/emacs-devel/2021-03/msg00959.html
* lisp/tab-bar.el (tab-bar-tab-group-current)
(tab-bar-tab-group-inactive, tab-bar-tab-ungrouped): New deffaces.
(tab-bar-tab-face-function): New defcustom.
(tab-bar-tab-face-default): New function.
(tab-bar-tab-name-format-default): Use it.
(tab-bar-tab-group-format-default): Use tab-bar-tab-group-inactive face.
(tab-bar-tab-group-face-function): New defcustom.
(tab-bar-tab-group-face-default): New function.
(tab-bar--format-tab-group): Add new arg 'current-p'.
(tab-bar-format-tabs-groups): Prepend current group name before first tab.
Override tab-bar-tab-face-function with tab-bar-tab-group-face-function.
* lisp/tab-bar.el (tab-bar-tabs-set): New function.
(tab-bar-tabs): Use tab-bar--current-tab-find and tab-bar-tabs-set.
(tab-bar--tab): Use tab-bar--current-tab-find.
(tab-bar--current-tab): Remove unused line (assq 'current-tab ...)
because there is no current-tab when it's called. Remove unused arg 'frame'.
(tab-bar--current-tab-find): Simplify.
(tab-bar-move-tab-to, tab-bar-move-tab-to-frame)
(tab-bar-new-tab-to, tab-bar-close-tab)
(tab-bar-close-other-tabs, tab-bar-undo-close-tab)
(tab-switcher-delete-from-list): Use tab-bar-tabs-set
instead of set-frame-parameter.
(tab-bar-close-group-tabs): Simplify using tab-bar--current-tab-find
without arg.
(tab-bar-tab-group-default): New function.
(tab-bar-tab-group-format-default, tab-bar-format-tabs-groups)
(tab-bar-change-tab-group, tab-bar-close-group-tabs): Use it.
* lisp/tab-bar.el (tab-bar-format): Turn defvar into defcustom.
Add :options and force-mode-line-update in :set.
(tab-bar--format-tab): New function refactored from tab-bar-format-tabs.
(tab-bar-format-tabs): Move most of code to tab-bar--format-tab and call it.
(tab-bar-tab-group-format-function): New defcustom.
(tab-bar-tab-group-format-default): New function.
(tab-bar--format-tab-group, tab-bar-format-tabs-groups): New functions.
(tab-bar-format-align-right, tab-bar-format-global): Shorten id.
(tab-bar-change-tab-group): Add refs to tab-bar-format in docstring.
(tab-bar-close-other-tabs, tab-bar-close-group-tabs): Use it.
(tab-bar--history-pre-change): Rename from
'tab-bar-history--pre-change' to follow naming convention.
(tab-bar-history-mode): Use renamed 'tab-bar--history-pre-change'.
(tab-close-group): New alias.
(tab-bar-close-other-tabs): Rewrite to fix old bug where regardless of
the returned value from tab-bar-tab-prevent-close-functions,
only one tab was retained.
* lisp/tab-bar.el (tab-bar--tab, tab-bar--current-tab): Add tab group if any.
(tab-bar-change-tab-group): New command.
(display-buffer-in-new-tab): Handle tab-group alist entry.
(tab-group): New alias.
(tab-prefix-map): Bind "G" to 'tab-group'.
WINDOW arg nil will always create a new window regardless of the value
returned by 'frame-root-window' that is nondeterministic - it returns
an internal window when there are more than 1 window on the frame/tab,
otherwise it returns a live window that was reused between different tabs
(bug#46904)
(tab-prefix-map): Bind "u" to 'tab-undo'.
* lisp/tab-bar.el (tab-bar--define-keys): Update global-mode-string
in mode-line-misc-info with condition to disable global-mode-string
in the mode line.
(tab-bar-format): New variable.
(tab-bar-format-history, tab-bar-format-add-tab)
(tab-bar-format-tabs): New functions with body from
'tab-bar-make-keymap-1'.
(tab-bar-format-align-right, tab-bar-format-global): New functions for
'tab-bar-format' list.
(tab-bar-format-list): New utility function.
(tab-bar-make-keymap-1): Just call 'tab-bar-format-list'.
https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg01210.html
* lisp/tab-bar.el (tab-bar-new-tab-to): Negative TO-INDEX counts
tabs from the end of the tab bar.
(tab-bar-new-tab): Fix docstring to add reference to
'tab-bar-new-tab-to'.
(tab-prefix-map): Bind "N" to tab-new-to.
* lisp/tab-bar.el (tab-bar-move-tab-to): Negative TO-INDEX counts
tabs from the end of the tab bar.
(tab-bar-move-tab): Fix docstring to add reference to tab-bar-move-tab-to.
(tab-prefix-map): Bind "M" to tab-move-to.
* lisp/tab-bar.el (tab-bar--define-keys): Rebind 0 from
tab-bar-switch-to-recent-tab to its alias tab-recent.
Bind 9 to tab-last.
(tab-bar-switch-to-last-tab): New command.
(tab-last): New alias to tab-bar-switch-to-last-tab.
(tab-bar-switch-to-tab, tab-bar-undo-close-tab): Fix docstrings to
avoid mentioning the term "last" for "most recently used" meaning.
* lisp/tab-bar.el (tab-bar--update-tab-bar-lines)
(tab-bar--tab-bar-lines-for-frame):
New functions to update value of tab-bar-lines in frames.
(tab-bar-mode, tab-bar-new-tab-to, tab-bar-close-tab)
(tab-bar-close-other-tab, tab-bar-show :set):
Use new function.
(tab-bar-select-tab-modifiers :set):
Work around visual glitch.
* lisp/tab-bar.el (tab-bar--define-keys, tab-bar--load-buttons):
Move some code here from 'tab-bar-mode'.
(tab-bar-new-tab-to): Call tab-bar--load-buttons and tab-bar--define-keys.
Copyright-paperwork-exempt: yes
* lisp/tab-bar.el (tab-bar-history-buttons-show): If true,
show back and forward buttons when tab-bar-history-mode
is enabled. (Bug#45227)
Copyright-paperwork-exempt: yes
* lisp/tab-bar.el (tab-switcher): Simplify by let-binding
tab-bar-new-tab-choice to t before calling tab-bar-new-tab
that handles the case when it's called in the active minibuffer.
* lisp/international/mule-util.el (truncate-string-ellipsis):
Change the default value to nil.
(truncate-string-ellipsis): New function.
(truncate-string-to-width): Use the value returned from the
function 'truncate-string-ellipsis'.
* lisp/tab-bar.el (tab-bar-tab-name-truncated):
* lisp/tab-line.el (tab-line-tab-name-ellipsis):
Take advantage of the improvement of the ellipsis default value
in truncate-string-to-width and truncate-string-ellipsis.
* doc/lispref/display.texi (Size of Displayed Text):
Improve description of truncate-string-ellipsis.
* doc/emacs/misc.texi (FFAP): Document new commands (bug#43503).
* lisp/ffap.el (ffap-read-only-other-tab): New command.
* lisp/tab-bar.el (find-file-read-only-other-tab): New command and
keystroke.
* lisp/tab-bar.el (tab-bar-rename-tab)
(tab-bar-rename-tab-by-name):
* lisp/simple.el (next-matching-history-element): Use
format-prompt in calls to read-from-minibuffer with at default
value.
* lisp/textmodes/rst.el (rst-insert-list-new-item):
* lisp/tab-bar.el (tab-bar-switch-to-tab):
* lisp/profiler.el (profiler-start):
* lisp/frame.el (set-frame-font):
* lisp/erc/erc.el (erc-join-channel):
* lisp/emacs-lock.el (emacs-lock--set-mode):
* lisp/emacs-lisp/elp.el (elp-set-master):
* lisp/emacs-lisp/checkdoc.el ()
(checkdoc-this-string-valid-engine):
* lisp/calendar/todo-mode.el (todo-find-filtered-items-file):
* lisp/calendar/calendar.el (calendar-set-date-style): Use
`format-prompt' in calls to completing-read that has a default
value, but didn't mention that in the prompt.