[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57848: 29.0.50; Problems with private tab-line-tab-name-function
From: |
Michael Heerdegen |
Subject: |
bug#57848: 29.0.50; Problems with private tab-line-tab-name-function |
Date: |
Mon, 31 Oct 2022 09:58:14 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Juri Linkov <juri@linkov.net> writes:
> Now this is fixed by using the same solution as used in
> `Info-set-mode-line' to escape %-constructs.
Thanks.
| +(defvar tab-line-cache-key-function #'tab-line-cache-key-default
| + "Function that adds more cache keys.
| +It has one argument with a list of tabs, and returns a list of cache keys.
| +You can use `add-function' to add more cache keys.")
There is something wrong with the second sentence of the doc string.
> Now a new function variable `tab-line-cache-key-function' is pushed,
> so you can add more cache keys with something like this:
>
> #+begin_src emacs-lisp
> (add-hook 'Info-mode-hook
> (defun my-setup-tab-line-for-Info-mode ()
> (add-function :filter-return (local 'tab-line-cache-key-function)
> (lambda (cache-keys)
> (cons mode-line-buffer-identification cache-keys)))
> (tab-line-mode +1)
> (setq-local
> tab-line-tab-name-function
> (lambda (b &optional _bs)
> [...]
> #+end_src
>
> Then visiting even such nodes as (info "(elisp) %-Constructs")
> doesn't have anymore the problem that you found above.
Very cool, thanks. I'll try it out a bit and report back.
Michael.