Function: tab-bar-close-tab-by-name
tab-bar-close-tab-by-name is an interactive and byte-compiled function
defined in tab-bar.el.gz.
Signature
(tab-bar-close-tab-by-name NAME)
Documentation
Close the tab given its NAME.
Interactively, prompt for NAME.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/tab-bar.el.gz
(defun tab-bar-close-tab-by-name (name)
"Close the tab given its NAME.
Interactively, prompt for NAME."
(interactive
(list (completing-read "Close tab by name: "
(mapcar (lambda (tab)
(alist-get 'name tab))
(funcall tab-bar-tabs-function)))))
(tab-bar-close-tab (1+ (tab-bar--tab-index-by-name name))))