help-gnu-emacs
[Top][All Lists]
Advanced

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

Tabbar. Hide for special buffers. What's wrong with my .emacs ?


From: Louise Hoffman
Subject: Tabbar. Hide for special buffers. What's wrong with my .emacs ?
Date: Sun, 10 May 2009 07:02:51 -0700 (PDT)
User-agent: G2/1.0

Dear readers,

I have just installed tabbar from
http://www.emacswiki.org/emacs/TabBarMode

and it works perfectly.

But when I add the code to "Hide for special buffers" the tabbar
disappears.

Can someone take a look at my .emacs file, and tell me, whats wrong?

Lots of love,
Louise

;; Lisp modules goes here
(add-to-list 'load-path "~/.elisp")

;; Enable tabbar
(require 'tabbar)
(tabbar-mode)

;; Tabbar just one group
(setq tabbar-buffer-groups-function
      (lambda ()
        (list "All")))

;; Tabbar Windows style (shift-)control tab behaviour and autoload
tabbar-mode
(dolist (func '(tabbar-mode tabbar-forward-tab tabbar-forward-group
tabbar-backward-tab tabbar-backward-group))
  (autoload func "tabbar" "Tabs at the top of buffers and easy control-
tab navigation"))
(defmacro defun-prefix-alt (name on-no-prefix on-prefix &optional do-
always)
  `(defun ,name (arg)
     (interactive "P")
     ,do-always
     (if (equal nil arg)
         ,on-no-prefix
       ,on-prefix)))
(defun-prefix-alt shk-tabbar-next (tabbar-forward-tab) (tabbar-forward-
group) (tabbar-mode 1))
(defun-prefix-alt shk-tabbar-prev (tabbar-backward-tab) (tabbar-
backward-group) (tabbar-mode 1))
(global-set-key [(control tab)] 'shk-tabbar-next)
(global-set-key [(control shift tab)] 'shk-tabbar-prev)


;; Tabbar. Hide for special buffers
(when (require 'tabbar nil t)
  (setq tabbar-buffer-groups-function
        (lambda (b) (list "All Buffers")))
  (setq tabbar-buffer-list-function
        (lambda ()
          (remove-if
           (lambda(buffer)
             (find (aref (buffer-name buffer) 0) " *"))
           (buffer-list))))
  (tabbar-mode))




reply via email to

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