[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tabs

From: Michael Heerdegen
Subject: Re: Tabs
Date: Sat, 05 Oct 2019 15:57:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Juri Linkov <address@hidden> writes:

> Now configuration is even simpler:
>   (add-hook 'Info-mode-hook
>             (lambda ()
>               (setq-local tab-line-tabs-function
>                           (lambda ()
>                             (mapcan
>                              (lambda (b)
>                                (when (with-current-buffer b (derived-mode-p 
> 'Info-mode))
>                                  (list b)))
>                              (buffer-list))))))

Works for me, thanks.

What I didn't get working is to show tabs only for Info buffers and hide
it for all others.  Whatever I tried tabs are either displayed in every
window or in none.

This is what I have so far:

#+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 ()
             (lambda ()
                (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)))))))

Can I get it work?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]