[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/modus-operandi-theme e32ca7d 37/99: Refine Org block be
From: |
Stefan Monnier |
Subject: |
[elpa] externals/modus-operandi-theme e32ca7d 37/99: Refine Org block beg/end line conditional styles |
Date: |
Fri, 31 Jul 2020 09:25:21 -0400 (EDT) |
branch: externals/modus-operandi-theme
commit e32ca7d2dfe00db58600553c1b0455efa014b1cf
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>
Refine Org block beg/end line conditional styles
Now the ':extend t' attribute is introduced when either the "distinct
blocks" or "rainbow src blocks" are enabled.
---
modus-operandi-theme.el | 36 +++++++++++++++++++++++++-----------
modus-vivendi-theme.el | 36 +++++++++++++++++++++++++-----------
2 files changed, 50 insertions(+), 22 deletions(-)
diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index c722890..0c92e97 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -544,14 +544,28 @@ 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-src-block (bgsrc bg)
- "Conditionally set the styles of Org source blocks.
-BGSRC applies to a distinct background. BG is used to keep
-blocks the same background as the rest of the buffer."
+(defun modus-operandi-theme-org-block (bgblk bg)
+ "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."
(if modus-operandi-theme-distinct-org-blocks
- (list :background bgsrc :extend t)
+ (append
+ (and (>= emacs-major-version 27) '(:extend t))
+ (list :background bgblk))
(list :background bg)))
+(defun modus-operandi-theme-org-block-delim (bgext fgext 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."
+ (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))
+ (list :background bg :foreground fg)))
+
(defun modus-operandi-theme-modeline-box (col3d col &optional btn int)
"Control the box properties of the mode line.
COL3D is the border that is intended for the three-dimensional
@@ -2799,12 +2813,12 @@ 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-src-block bg-dim bg-main)
+ `(org-block ((,class ,@(modus-operandi-theme-org-block bg-dim bg-main)
:inherit fixed-pitch :foreground ,fg-main)))
- `(org-block-begin-line ((,class ,@(and (>= emacs-major-version 27)
-
modus-operandi-theme-distinct-org-blocks
- '(:extend t))
- :inherit fixed-pitch :background ,bg-alt
:foreground ,fg-special-mild)))
+ `(org-block-begin-line ((,class ,@(modus-operandi-theme-org-block-delim
+ bg-active fg-special-cold
+ bg-alt fg-special-mild)
+ :inherit fixed-pitch)))
`(org-block-end-line ((,class :inherit org-block-begin-line)))
`(org-checkbox ((,class :box (:line-width 1 :color ,bg-active)
:background ,bg-inactive :foreground ,fg-active)))
@@ -2880,7 +2894,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-src-block bg-dim bg-main)
+ `(org-quote ((,class ,@(modus-operandi-theme-org-block bg-dim bg-main)
:foreground ,fg-special-cold :slant
,modus-theme-slant)))
`(org-scheduled ((,class :foreground ,fg-special-cold)))
`(org-scheduled-previously ((,class :foreground ,fg-special-warm)))
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 88caf8d..cb90582 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -544,14 +544,28 @@ 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-src-block (bgsrc bg)
- "Conditionally set the styles of Org source blocks.
-BGSRC applies to a distinct background. BG is used to keep
-blocks the same background as the rest of the buffer."
+(defun modus-vivendi-theme-org-block (bgblk bg)
+ "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."
(if modus-vivendi-theme-distinct-org-blocks
- (list :background bgsrc :extend t)
+ (append
+ (and (>= emacs-major-version 27) '(:extend t))
+ (list :background bgblk))
(list :background bg)))
+(defun modus-vivendi-theme-org-block-delim (bgext fgext 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."
+ (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))
+ (list :background bg :foreground fg)))
+
(defun modus-vivendi-theme-modeline-box (col3d col &optional btn int)
"Control the box properties of the mode line.
COL3D is the border that is intended for the three-dimensional
@@ -2799,12 +2813,12 @@ 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-src-block bg-dim bg-main)
+ `(org-block ((,class ,@(modus-vivendi-theme-org-block bg-dim bg-main)
:inherit fixed-pitch :foreground ,fg-main)))
- `(org-block-begin-line ((,class ,@(and (>= emacs-major-version 27)
-
modus-vivendi-theme-distinct-org-blocks
- '(:extend t))
- :inherit fixed-pitch :background ,bg-alt
:foreground ,fg-special-mild)))
+ `(org-block-begin-line ((,class ,@(modus-vivendi-theme-org-block-delim
+ bg-active fg-special-cold
+ bg-alt fg-special-mild)
+ :inherit fixed-pitch)))
`(org-block-end-line ((,class :inherit org-block-begin-line)))
`(org-checkbox ((,class :box (:line-width 1 :color ,bg-active)
:background ,bg-inactive :foreground ,fg-active)))
@@ -2880,7 +2894,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-src-block bg-dim bg-main)
+ `(org-quote ((,class ,@(modus-vivendi-theme-org-block bg-dim bg-main)
:foreground ,fg-special-cold :slant
,modus-theme-slant)))
`(org-scheduled ((,class :foreground ,fg-special-cold)))
`(org-scheduled-previously ((,class :foreground ,fg-special-warm)))
- [elpa] externals/modus-operandi-theme 72e1f6b 68/99: Minor review of MARKDOWN-MODE faces, (continued)
- [elpa] externals/modus-operandi-theme 72e1f6b 68/99: Minor review of MARKDOWN-MODE faces, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 7bf96d9 73/99: Internal: review of docs, outline comments, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 8a555e9 77/99: Internal: fix misplaced comment line, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme d8986b7 79/99: Let outline-minor-faces respect "section headings", Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme c2b800d 81/99: Tweak default background of outline-minor-faces, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme ffd9f1f 85/99: Update section on mixed font docs, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme c376b08 98/99: Prepare version 0.11.0, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 624cbd6 46/99: Improve README for Org-block-related options, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 5d2e6ae 49/99: Reference issue 54 regarding "mixed fonts" in Org, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 1cf8571 53/99: Add support for ESHELL-PROMPT-EXTRAS, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme e32ca7d 37/99: Refine Org block beg/end line conditional styles,
Stefan Monnier <=
- [elpa] externals/modus-operandi-theme 34eeaa8 40/99: Tweak 'secondary-selection' face, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 362f626 48/99: Remove now-outdated README note, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 16ad838 59/99: Tweak keycast for when "3D modeline" option is 't', Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 89f94d5 67/99: Add link for more font- and writing- related confs, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 3306e4b 64/99: Amend adeee9f73:Normalise luminance of nuanced bgs, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 3f18a36 72/99: RENAME CUSTOM OPTION for variable-pitch headings, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 099fe43 78/99: Revert commit 94e113878, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 1e466e0 80/99: Modus Operandi: fix bad var from commit d8986b791, Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme 8414a5d 86/99: Unquote face symbols in 'org-src-block-faces', Stefan Monnier, 2020/07/31
- [elpa] externals/modus-operandi-theme b8c3d0f 83/99: Use new symbol for variable-pitch headings option, Stefan Monnier, 2020/07/31