From 0912f077d09df476a97bdd6d8446b5736809d06c Mon Sep 17 00:00:00 2001 From: Riyyi Date: Fri, 31 Jul 2020 16:14:25 +0200 Subject: [PATCH] Fix centaur-tabs hide function --- .emacs.d/config.org | 57 ++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/.emacs.d/config.org b/.emacs.d/config.org index 185e7a0..0b7fa58 100644 --- a/.emacs.d/config.org +++ b/.emacs.d/config.org @@ -948,33 +948,36 @@ Functions that only use built-in Emacs functionality. Functions that use package functionality. #+BEGIN_SRC emacs-lisp - (defun centaur-tabs-buffer-groups () - "Organize tabs into groups by buffer." - (list - (cond - ((string-equal "*" (substring (buffer-name) 0 1)) "Emacs") - ((memq major-mode '(org-mode - emacs-lisp-mode)) "Org Mode") - ((derived-mode-p 'dired-mode) "Dired") - ((derived-mode-p 'prog-mode - 'text-mode) "Editing") - (t "User")))) - - (defun centaur-tabs-hide-tab (buffer) - "Hide from the tab bar by BUFFER name." - (let ((name (format "%s" buffer))) - (string-match-p - (concat "^\\*\\(" - "e?shell\\|" - "Completions\\|" - "clangd\\|" ; lsp c/c++ - "Faces\\|" - "Help\\|" - "helpful\\|" - "iph\\|" ; lsp php - "Occur" - "\\).*") - name))) + (with-eval-after-load 'centaur-tabs + (defun centaur-tabs-buffer-groups () + "Organize tabs into groups by buffer." + (list + (cond + ((string-equal "*" (substring (buffer-name) 0 1)) "Emacs") + ((memq major-mode '(org-mode + emacs-lisp-mode)) "Org Mode") + ((derived-mode-p 'dired-mode) "Dired") + ((derived-mode-p 'prog-mode + 'text-mode) "Editing") + (t "User")))) + + (defun centaur-tabs-hide-tab (buffer) + "Hide from the tab bar by BUFFER name." + (let ((name (format "%s" buffer))) + (string-match-p + (concat "^\\*\\(" + "e?shell\\|" + "Completions\\|" + "clangd\\|" ; lsp c/c++ + "Faces\\|" + "Flycheck\\|" + "Help\\|" + "helpful\\|" + "iph\\|" ; lsp php + "Occur" + "\\).*") + name))) + ) (defun dashboard-goto-bookmarks () "Go to bookmarks."