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

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

[elpa] externals/modus-operandi-theme 3521fae 42/99: Simplify conditiona


From: Stefan Monnier
Subject: [elpa] externals/modus-operandi-theme 3521fae 42/99: Simplify conditional use of Org block background
Date: Fri, 31 Jul 2020 09:25:22 -0400 (EDT)

branch: externals/modus-operandi-theme
commit 3521fae7d819b19351d0e04f2d929d1577823c6b
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Simplify conditional use of Org block background
---
 modus-operandi-theme.el | 13 +++++++------
 modus-vivendi-theme.el  | 13 +++++++------
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index b4fa750..57f605c 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -544,15 +544,16 @@ and the border.  FG is used when no block style is in 
effect."
       (list :background bgbox :foreground fgbox :box (list :color fgbox))
     (list :foreground fg)))
 
-(defun modus-operandi-theme-org-block (bgblk bg)
+(defun modus-operandi-theme-org-block (bgblk)
   "Conditionally set the background of Org blocks.
-BGBLK applies to a distinct neutral background.  BG is used to
-keep blocks the same background as the rest of the buffer."
+BGBLK applies to a distinct neutral background.  Else blocks have
+no background of their own (the default), so they look the same
+as the rest of the buffer."
   (if modus-operandi-theme-distinct-org-blocks
       (append
        (and (>= emacs-major-version 27) '(:extend t))
        (list :background bgblk))
-    (list :background bg)))
+    (list :background nil)))
 
 (defun modus-operandi-theme-org-block-delim (bgext fgext bg fg)
   "Conditionally set the styles of Org block delimiters.
@@ -2813,7 +2814,7 @@ Also bind `class' to ((class color) (min-colors 89))."
                                    :foreground ,fg-special-mild
                                    ,@(modus-operandi-theme-scale 
modus-operandi-theme-scale-3))))
    `(org-archived ((,class :background ,bg-alt :foreground ,fg-alt)))
-   `(org-block ((,class ,@(modus-operandi-theme-org-block bg-dim bg-main)
+   `(org-block ((,class ,@(modus-operandi-theme-org-block bg-dim)
                         :inherit fixed-pitch :foreground ,fg-main)))
    `(org-block-begin-line ((,class ,@(modus-operandi-theme-org-block-delim
                                       bg-active fg-special-cold
@@ -2894,7 +2895,7 @@ Also bind `class' to ((class color) (min-colors 89))."
    `(org-mode-line-clock-overrun ((,class :inherit modus-theme-active-red)))
    `(org-priority ((,class ,@(modus-operandi-theme-org-todo-block 
magenta-nuanced-bg magenta-nuanced magenta)
                            ,@(modus-operandi-theme-heading-foreground magenta 
magenta-alt-other))))
-   `(org-quote ((,class ,@(modus-operandi-theme-org-block bg-dim bg-main)
+   `(org-quote ((,class ,@(modus-operandi-theme-org-block bg-dim)
                         :foreground ,fg-special-cold :slant 
,modus-theme-slant)))
    `(org-scheduled ((,class :foreground ,green-alt-other)))
    `(org-scheduled-previously ((,class :foreground ,yellow-alt-other)))
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 3f9b316..96c9dd5 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -544,15 +544,16 @@ and the border.  FG is used when no block style is in 
effect."
       (list :background bgbox :foreground fgbox :box (list :color fgbox))
     (list :foreground fg)))
 
-(defun modus-vivendi-theme-org-block (bgblk bg)
+(defun modus-vivendi-theme-org-block (bgblk)
   "Conditionally set the background of Org blocks.
-BGBLK applies to a distinct neutral background.  BG is used to
-keep blocks the same background as the rest of the buffer."
+BGBLK applies to a distinct neutral background.  Else blocks have
+no background of their own (the default), so they look the same
+as the rest of the buffer."
   (if modus-vivendi-theme-distinct-org-blocks
       (append
        (and (>= emacs-major-version 27) '(:extend t))
        (list :background bgblk))
-    (list :background bg)))
+    (list :background nil)))
 
 (defun modus-vivendi-theme-org-block-delim (bgext fgext bg fg)
   "Conditionally set the styles of Org block delimiters.
@@ -2813,7 +2814,7 @@ Also bind `class' to ((class color) (min-colors 89))."
                                    :foreground ,fg-special-mild
                                    ,@(modus-vivendi-theme-scale 
modus-vivendi-theme-scale-3))))
    `(org-archived ((,class :background ,bg-alt :foreground ,fg-alt)))
-   `(org-block ((,class ,@(modus-vivendi-theme-org-block bg-dim bg-main)
+   `(org-block ((,class ,@(modus-vivendi-theme-org-block bg-dim)
                         :inherit fixed-pitch :foreground ,fg-main)))
    `(org-block-begin-line ((,class ,@(modus-vivendi-theme-org-block-delim
                                       bg-active fg-special-cold
@@ -2894,7 +2895,7 @@ Also bind `class' to ((class color) (min-colors 89))."
    `(org-mode-line-clock-overrun ((,class :inherit modus-theme-active-red)))
    `(org-priority ((,class ,@(modus-vivendi-theme-org-todo-block 
magenta-nuanced-bg magenta-nuanced magenta)
                            ,@(modus-vivendi-theme-heading-foreground magenta 
magenta-alt-other))))
-   `(org-quote ((,class ,@(modus-vivendi-theme-org-block bg-dim bg-main)
+   `(org-quote ((,class ,@(modus-vivendi-theme-org-block bg-dim)
                         :foreground ,fg-special-cold :slant 
,modus-theme-slant)))
    `(org-scheduled ((,class :foreground ,green-alt-other)))
    `(org-scheduled-previously ((,class :foreground ,yellow-alt-other)))



reply via email to

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