[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 fd48201ffe: * lisp/tab-line.el (tab-line-cache-key-default): Mo
From: |
Juri Linkov |
Subject: |
emacs-29 fd48201ffe: * lisp/tab-line.el (tab-line-cache-key-default): More cache keys (bug#60340). |
Date: |
Wed, 28 Dec 2022 12:49:08 -0500 (EST) |
branch: emacs-29
commit fd48201ffe77d20729002abea63e1b6d8502d186
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
* lisp/tab-line.el (tab-line-cache-key-default): More cache keys
(bug#60340).
Move more cache keys here from 'tab-line-format' to give users more freedom.
---
lisp/tab-line.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index c4e4a68872..30612728bd 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -572,9 +572,14 @@ For use in `tab-line-tab-face-functions'."
(defvar tab-line-auto-hscroll)
-(defun tab-line-cache-key-default (_tabs)
+(defun tab-line-cache-key-default (tabs)
"Return default list of cache keys."
(list
+ tabs
+ ;; handle buffer renames
+ (buffer-name (window-buffer))
+ ;; handle tab-line scrolling
+ (window-parameter nil 'tab-line-hscroll)
;; for setting face 'tab-line-tab-current'
(mode-line-window-selected-p)
;; for `tab-line-tab-face-modified'
@@ -591,12 +596,7 @@ of cache keys. You can use `add-function' to add more
cache keys.")
(defun tab-line-format ()
"Format for displaying the tab line of the selected window."
(let* ((tabs (funcall tab-line-tabs-function))
- (cache-key (append (list tabs
- ;; handle buffer renames
- (buffer-name (window-buffer))
- ;; handle tab-line scrolling
- (window-parameter nil 'tab-line-hscroll))
- (funcall tab-line-cache-key-function tabs)))
+ (cache-key (funcall tab-line-cache-key-function tabs))
(cache (window-parameter nil 'tab-line-cache)))
;; Enable auto-hscroll again after it was disabled on manual scrolling.
;; The moment to enable it is when the window-buffer was updated.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 fd48201ffe: * lisp/tab-line.el (tab-line-cache-key-default): More cache keys (bug#60340).,
Juri Linkov <=