diff options
author | Juri Linkov <juri@linkov.net> | 2022-12-21 19:30:24 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2022-12-21 19:30:24 +0200 |
commit | 98c16a8c8838f068b9930d37d747ed2a357ba1c2 (patch) | |
tree | b6bf535e818ac59c74bd08b02ba3e9fbe8e75292 /lisp | |
parent | d76d7a3bebf1ff0b06a38f7f96d316752844ed10 (diff) | |
download | emacs-98c16a8c8838f068b9930d37d747ed2a357ba1c2.tar.gz emacs-98c16a8c8838f068b9930d37d747ed2a357ba1c2.tar.bz2 emacs-98c16a8c8838f068b9930d37d747ed2a357ba1c2.zip |
; * lisp/tab-bar.el: Remaining renaming of "fixed-width" to "auto-width".
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/tab-bar.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index f040bc9786d..a4779af04aa 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -1021,7 +1021,7 @@ This variable has effect only when `tab-bar-auto-width' is non-nil." :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") @@ -1040,17 +1040,17 @@ tab bar might wrap to the second line when it shouldn't.") 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 @@ -1078,7 +1078,7 @@ tab bar might wrap to the second line when it shouldn't.") (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)) |