[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tabs
From: |
Michael Heerdegen |
Subject: |
Re: Tabs |
Date: |
Sun, 06 Oct 2019 10:22:55 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Juri Linkov <address@hidden> writes:
> > #+begin_src emacs-lisp
> > (customize-set-variable 'tab-bar-show 1)
> > (setq-default tab-bar-tabs-function #'ignore)
> > (add-hook 'Info-mode-hook
> > (defun my-Info-mode-hook-configure-tab-bar ()
> > (setq-local
> > tab-bar-tabs-function
> > (lambda ()
> > (mapcan
> > (lambda (b)
> > (when (with-current-buffer b (derived-mode-p 'Info-mode))
> > (list `(,(if (eq b (current-buffer)) 'current-tab 'tab)
> > (name . ,(buffer-name b))
> > (binding . (lambda () (interactive)
> > (switch-to-buffer ,b)))
> > (close-binding . (lambda () (interactive)
> > (kill-buffer ,b) (force-mode-line-update)))))))
> > (buffer-list))))))
> > #+end_src
> >
> > Can I get it work?
>
> I tried your code, and it works fine: tabs are shown only when
> the current buffer is in Info mode, and hidden when the selected window's
> buffer is in other modes.
Hmm, no not for me, I never get tabs with this code. I also tried with
emacs -Q. This is with current master - or do I still have to use a
different branch?
I see that (funcall tab-bar-tabs-function) in info buffers returns a
list with multiple elements, so it /should/ work.
Regards,
Michael.
- Re: Tabs, Michael Heerdegen, 2019/10/05
- Re: Tabs, Juri Linkov, 2019/10/05
- Re: Tabs,
Michael Heerdegen <=
- Re: Tabs, Michael Heerdegen, 2019/10/06
- Re: Tabs, Michael Heerdegen, 2019/10/06
- Re: Tabs, Eli Zaretskii, 2019/10/06
- Re: Tabs, Juri Linkov, 2019/10/06
- Re: Tabs, Juri Linkov, 2019/10/06
- Re: Tabs, Eli Zaretskii, 2019/10/06
- Re: Tabs, Eli Zaretskii, 2019/10/06
- Re: Tabs, Michael Heerdegen, 2019/10/06
- Re: Tabs, Juri Linkov, 2019/10/06
- Re: Tabs, Eli Zaretskii, 2019/10/06