[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/modus-operandi-theme 8a0b566 43/99: Refine conditional
From: |
Stefan Monnier |
Subject: |
[elpa] externals/modus-operandi-theme 8a0b566 43/99: Refine conditional beg/end styles for Org blocks |
Date: |
Fri, 31 Jul 2020 09:25:23 -0400 (EDT) |
branch: externals/modus-operandi-theme
commit 8a0b566e7d5e1fdf1422fec3d0d1328b16778e95
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Refine conditional beg/end styles for Org blocks
This is based on feedback I received in issue 57:
https://gitlab.com/protesilaos/modus-themes/-/issues/57
Refer to that link for up-to-date screenshots and/or to share your
thoughts.
---
modus-operandi-theme.el | 21 +++++++++++++++------
modus-vivendi-theme.el | 21 +++++++++++++++------
2 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index 57f605c..7564e65 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -555,16 +555,25 @@ as the rest of the buffer."
(list :background bgblk))
(list :background nil)))
-(defun modus-operandi-theme-org-block-delim (bgext fgext bg fg)
+(defun modus-operandi-theme-org-block-delim (bgaccent fgaccent bg fg)
"Conditionally set the styles of Org block delimiters.
-BGEXT and FGEXT apply a background and foreground colour
-respectively and set the `:extend' attribute where applicable.
-BG and FG should be a largely neutral colour combination."
+BG, FG, BGACCENT, FGACCENT apply a background and foreground
+colour respectively and set the `:extend' attribute where
+applicable.
+
+The former pair is a greyscale combination that should be more
+distinct than the background of the block.
+
+The latter pair should be more subtle than the background of the
+block, as it is used when source blocks are cast on a
+coloured/accented backdrop."
(if (or modus-operandi-theme-distinct-org-blocks
modus-operandi-theme-rainbow-org-src-blocks)
(append
(and (>= emacs-major-version 27) '(:extend t))
- (list :background bgext :foreground fgext))
+ (if modus-operandi-theme-rainbow-org-src-blocks
+ (list :background bgaccent :foreground fgaccent)
+ (list :background bg :foreground fg)))
(list :background bg :foreground fg)))
(defun modus-operandi-theme-modeline-box (col3d col &optional btn int)
@@ -2817,7 +2826,7 @@ Also bind `class' to ((class color) (min-colors 89))."
`(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
+ bg-dim fg-special-cold
bg-alt fg-special-mild)
:inherit fixed-pitch)))
`(org-block-end-line ((,class :inherit org-block-begin-line)))
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 96c9dd5..56edcca 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -555,16 +555,25 @@ as the rest of the buffer."
(list :background bgblk))
(list :background nil)))
-(defun modus-vivendi-theme-org-block-delim (bgext fgext bg fg)
+(defun modus-vivendi-theme-org-block-delim (bgaccent fgaccent bg fg)
"Conditionally set the styles of Org block delimiters.
-BGEXT and FGEXT apply a background and foreground colour
-respectively and set the `:extend' attribute where applicable.
-BG and FG should be a largely neutral colour combination."
+BG, FG, BGACCENT, FGACCENT apply a background and foreground
+colour respectively and set the `:extend' attribute where
+applicable.
+
+The former pair is a greyscale combination that should be more
+distinct than the background of the block.
+
+The latter pair should be more subtle than the background of the
+block, as it is used when source blocks are cast on a
+coloured/accented backdrop."
(if (or modus-vivendi-theme-distinct-org-blocks
modus-vivendi-theme-rainbow-org-src-blocks)
(append
(and (>= emacs-major-version 27) '(:extend t))
- (list :background bgext :foreground fgext))
+ (if modus-vivendi-theme-rainbow-org-src-blocks
+ (list :background bgaccent :foreground fgaccent)
+ (list :background bg :foreground fg)))
(list :background bg :foreground fg)))
(defun modus-vivendi-theme-modeline-box (col3d col &optional btn int)
@@ -2817,7 +2826,7 @@ Also bind `class' to ((class color) (min-colors 89))."
`(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
+ bg-dim fg-special-cold
bg-alt fg-special-mild)
:inherit fixed-pitch)))
`(org-block-end-line ((,class :inherit org-block-begin-line)))
- [elpa] externals/modus-operandi-theme 3521fae 42/99: Simplify conditional use of Org block background, (continued)
- [elpa] externals/modus-operandi-theme 3521fae 42/99: Simplify conditional use of Org block background, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme f382ac1 44/99: Tweak 'org-quote' face, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme a6cd22b 50/99: Refine org-scheduled face (amend commit c6fcf5122), Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 32f3d6f 52/99: Add support for ESHELL-GIT-PROMPT, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 5435753 14/99: Refine 'org-todo' for "rainbow headings" option, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme b584076 15/99: Review colour for 'font-lock-preprocessor-face', Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 5c38177 28/99: Remove obsolete note in README, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 9a52600 29/99: Add support for two new HELM faces, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 0c90a92 34/99: Tweak various preprocessor faces for consistency, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 98073da 36/99: Refine FOUNTAIN faces, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 8a0b566 43/99: Refine conditional beg/end styles for Org blocks,
Stefan Monnier <=
- [elpa] externals/modus-operandi-theme 80e95c0 45/99: Use more appropriate colour for PAREN-FACE package, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 28d5b83 47/99: Add README suggestions for "faint syntax" option, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme cba4339 51/99: Add support for ESHELL-FRINGE-STATUS, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme cfc5d24 54/99: Minor tweaks to the README, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme efa3431 63/99: MAJOR REVIEW of Org block custom option, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme e22d75d 71/99: Let org timestamps inherit fixed-pitch, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 0a0af53 65/99: Add support for BOON, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 94e1138 76/99: Remove extra properties from outline-minor-mode, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 426578f 75/99: MAJOR REFACTOR of bold weight and bold constructs, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 37b6bd0 88/99: Adds a readme note referring to #60 for HTML mails, Stefan Monnier, 2020/07/31