几种模式覆盖我的自定义tabbar-buffer-groups-function :(

时间:2013-09-17 13:48:25

标签: emacs tabs customization

我已经定制tabbar-buffer-groups-function但成效有限,但某些模式通常会覆盖这一点。例如,java-modethrift-mode要求它们存在于自己的标签组中,但我希望它们使用相同的"user"组。

有人可以帮我强化所需的tabbar群组行为吗?请...-mode挂钩修复此问题吗?

https://github.com/mcandre/dotfiles/blob/master/.emacs#L142

1 个答案:

答案 0 :(得分:0)

简化条件似乎可以解决问题。

    ;; Tab groups: irc, emacs, user
    (defun tabbar-buffer-groups ()
      (list (cond
             ;; IRC
             ((eq major-mode 'rcirc-mode) "irc")
             ;; Emacs-internal / dired
             ((or (string-match "^\\*" (buffer-name)) (eq major-mode 'dired-mode)) "emacs")
             ;; all other buffers
             (t "user"))))