emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/modus-vivendi-theme a0e9380 055/110: Add tentative supp


From: Stefan Monnier
Subject: [elpa] externals/modus-vivendi-theme a0e9380 055/110: Add tentative support for Emacs27 TAB-{BAR, LINE}
Date: Wed, 29 Apr 2020 21:40:06 -0400 (EDT)

branch: externals/modus-vivendi-theme
commit a0e9380d5536ccb8418ad86c2d942c9b2c2f3c90
Author: Protesilaos Stavrou <address@hidden>
Commit: Protesilaos Stavrou <address@hidden>

    Add tentative support for Emacs27 TAB-{BAR,LINE}
    
    The reason this is considered "tentative" is that I am using an uncommon
    way to declare those faces: rather than add them to the list, I wrap
    them in a new `custom-theme-set-faces' that evaluates for Emacs 27+.
    
    Such a workaround is necessary to avoid errors with the linter.  It
    throws an error every time a built-in package is introduced in a version
    of Emacs that is higher than the minimum requirement specified in the
    theme's header.
---
 modus-operandi-theme.el | 21 +++++++++++++++++++++
 modus-vivendi-theme.el  | 21 +++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index d3ac94b..f6cc28b 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -255,6 +255,8 @@
 ;;     swoop
 ;;     sx
 ;;     symbol-overlay
+;;     tab-bar-mode
+;;     tab-line-mode
 ;;     syslog-mode
 ;;     trashed
 ;;     telephone-line
@@ -2996,6 +2998,25 @@ AMOUNT is a customisation option."
    `(ztreep-leaf-face ((,class (:foreground ,cyan))))
    `(ztreep-node-count-children-face ((,class (:foreground ,fg-special-warm))))
    `(ztreep-node-face ((,class (:foreground ,fg-main))))
+   (when (>= emacs-major-version 27) ; EXPERIMENTAL this form is subject to 
review
+     (custom-theme-set-faces
+      'modus-operandi
+      ;;;; tab-bar-mode
+      `(tab-bar ((,class (:background ,bg-alt :foreground ,fg-alt))))
+      `(tab-bar-tab ((,class (:box (:line-width 1 :color ,fg-alt)
+                                   :background ,bg-tab-active :foreground 
,fg-main))))
+      `(tab-bar-tab-inactive ((,class (:box (:line-width 1 :color 
,bg-tab-active)
+                                            :background ,bg-tab-inactive 
:foreground ,fg-dim))))
+      ;;;; tab-line-mode
+      `(tab-line ((,class (:height 0.95 :background ,bg-active :foreground 
,fg-active))))
+      `(tab-line-close-highlight ((,class (:foreground ,red-active))))
+      `(tab-line-highlight ((,class (:background ,bg-tab-active :foreground 
,fg-main))))
+      `(tab-line-tab ((,class (:box (:line-width 1 :color ,fg-alt)
+                                    :background ,bg-tab-active :foreground 
,fg-main))))
+      `(tab-line-tab-current ((,class (:box (:line-width 1 :color ,fg-alt)
+                                            :background ,bg-tab-active 
:foreground ,fg-main))))
+      `(tab-line-tab-inactive ((,class (:box (:line-width 1 :color 
,bg-tab-active)
+                                             :background ,bg-tab-inactive 
:foreground ,fg-dim))))))
    ;;; Theme Variables
    (custom-theme-set-variables
     'modus-operandi
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index aa21b58..909d107 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -255,6 +255,8 @@
 ;;     swoop
 ;;     sx
 ;;     symbol-overlay
+;;     tab-bar-mode
+;;     tab-line-mode
 ;;     syslog-mode
 ;;     trashed
 ;;     telephone-line
@@ -2996,6 +2998,25 @@ AMOUNT is a customisation option."
    `(ztreep-leaf-face ((,class (:foreground ,cyan))))
    `(ztreep-node-count-children-face ((,class (:foreground ,fg-special-warm))))
    `(ztreep-node-face ((,class (:foreground ,fg-main))))
+   (when (>= emacs-major-version 27) ; EXPERIMENTAL this form is subject to 
review
+     (custom-theme-set-faces
+      'modus-vivendi
+      ;;;; tab-bar-mode
+      `(tab-bar ((,class (:background ,bg-alt :foreground ,fg-alt))))
+      `(tab-bar-tab ((,class (:box (:line-width 1 :color ,fg-alt)
+                                   :background ,bg-tab-active :foreground 
,fg-main))))
+      `(tab-bar-tab-inactive ((,class (:box (:line-width 1 :color 
,bg-tab-active)
+                                            :background ,bg-tab-inactive 
:foreground ,fg-dim))))
+      ;;;; tab-line-mode
+      `(tab-line ((,class (:height 0.95 :background ,bg-active :foreground 
,fg-active))))
+      `(tab-line-close-highlight ((,class (:foreground ,red-active))))
+      `(tab-line-highlight ((,class (:background ,bg-tab-active :foreground 
,fg-main))))
+      `(tab-line-tab ((,class (:box (:line-width 1 :color ,fg-alt)
+                                    :background ,bg-tab-active :foreground 
,fg-main))))
+      `(tab-line-tab-current ((,class (:box (:line-width 1 :color ,fg-alt)
+                                            :background ,bg-tab-active 
:foreground ,fg-main))))
+      `(tab-line-tab-inactive ((,class (:box (:line-width 1 :color 
,bg-tab-active)
+                                             :background ,bg-tab-inactive 
:foreground ,fg-dim))))))
    ;;; Theme Variables
    (custom-theme-set-variables
     'modus-vivendi



reply via email to

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