:initialize 'custom-initialize-default
:set (lambda (sym val)
(set-default sym val)
- (setq tab-bar--fixed-width-hash nil))
+ (setq tab-bar--auto-width-hash nil))
:group 'tab-bar
:version "29.1")
tab-bar-tab-group-inactive)
"Resize tabs only with these faces.")
-(defvar tab-bar--fixed-width-hash nil
+(defvar tab-bar--auto-width-hash nil
"Memoization table for `tab-bar-auto-width'.")
(defun tab-bar-auto-width (items)
"Return tab-bar items with resized tab names."
- (unless tab-bar--fixed-width-hash
- (define-hash-table-test 'tab-bar--fixed-width-hash-test
+ (unless tab-bar--auto-width-hash
+ (define-hash-table-test 'tab-bar--auto-width-hash-test
#'equal-including-properties
#'sxhash-equal-including-properties)
- (setq tab-bar--fixed-width-hash
- (make-hash-table :test 'tab-bar--fixed-width-hash-test)))
+ (setq tab-bar--auto-width-hash
+ (make-hash-table :test 'tab-bar--auto-width-hash-test)))
(let ((tabs nil) ;; list of resizable tabs
(non-tabs "") ;; concatenated names of non-resizable tabs
(width 0)) ;; resize tab names to this width
(setf (nth 2 item)
(with-memoization (gethash (list (selected-frame)
width (nth 2 item))
- tab-bar--fixed-width-hash)
+ tab-bar--auto-width-hash)
(let* ((name (nth 2 item))
(len (length name))
(close-p (get-text-property (1- len) 'close-tab name))