;; evaluate this file sexp after sexp and follow the comments. ;; set a minimal environment (progn (custom-set-faces '(current-tab-face ((t ( :inherit 'default-face :foreground "lightblue" :bold t :underline t)))) '(odd-tab-face ((t ( :background "red" :foreground "white" )))) '(even-tab-face ((t ( :background "green" :foreground "black"))))) (set-frame-parameter (selected-frame) 'tab-bar-lines 4) (set-frame-parameter (selected-frame) 'menu-bar-lines 0)) ;;make a few tabs from index #0 up to #9 (dotimes (i 10) (make-terminal-frame '((tab . t)))) ;; make a tab #10 that keeps a window configuration. When it is created, ;; it memories the current win config. When it is activated, it ;; restores the memorized win config (make-terminal-frame '((tab . t) (tab:init . (lambda () (setq cwce (current-window-configuration)))) (tab:activate . (lambda () (set-window-configuration cwce))) (tab:deactivate . (lambda () (message "qqq"))))) ;; change the window configuration ((lambda nil (split-window-vertically) (split-window-vertically) (split-window-horizontally))) ;; now activate the tab that keeps the memorized win config. this ;; function disovered a bug in window configuration . LOL. If you ;; change the tab-bar-lines or menu-bar-lines after creating the tab ;; #10 and before activatin it here, emacs crashes. LOL. (set-frame-parameter (selected-frame) 'current-tab 10) ;; try it: now try to change the window config, activate tab #0, and ;; reactivate tab #10. ;; dump frame params (progn (setq eval-expression-print-length 5000 eval-expression-print-level 5000 print-level 5000 ) (frame-parameters) ) ;; that's all for now.