unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* [Question] Which function is used internally to update the tab-bar?
@ 2023-12-31 18:09 Rodrigo Morales
  2024-01-01  3:05 ` Rodrigo Morales
  0 siblings, 1 reply; 2+ messages in thread
From: Rodrigo Morales @ 2023-12-31 18:09 UTC (permalink / raw)
  To: help-gnu-emacs

I'm learning how to customize tab-bar. I want to know the function
that is used for updating the content of the tab-bar.

I've noticed that the content of the tab-bar is updated whenever I call
=other-window= (by default, bound to =C-x o=).I wrote the following
function which helped me identify the exact times at which the tab-bar
is updated.

#+BEGIN_SRC emacs-lisp
(defun my/f ()
  (format-time-string "%H:%M:%S.%N"))

(setq tab-bar-format
      '(tab-bar-format-tabs
        tab-bar-format-align-right
        tab-bar-format-global
        my/f))
#+END_SRC

While trying to find the relevant function, I found the function
tab-bar--update-tab-bar-lines. However, when I evaluate this sexp
(tab-bar--update-tab-bar-lines), the tab-bar of the current frame is not
updated.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Question] Which function is used internally to update the tab-bar?
  2023-12-31 18:09 [Question] Which function is used internally to update the tab-bar? Rodrigo Morales
@ 2024-01-01  3:05 ` Rodrigo Morales
  0 siblings, 0 replies; 2+ messages in thread
From: Rodrigo Morales @ 2024-01-01  3:05 UTC (permalink / raw)
  To: help-gnu-emacs

> I'm learning how to customize tab-bar. I want to know the function
> that is used for updating the content of the tab-bar.

The function is =force-mode-line-update=.

I found it by opening tab-bar.el.gz and searching the string =update=.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-01  3:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-31 18:09 [Question] Which function is used internally to update the tab-bar? Rodrigo Morales
2024-01-01  3:05 ` Rodrigo Morales

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).