[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/modus-vivendi-theme b5dba7a 081/110: Internal: use defu
From: |
Stefan Monnier |
Subject: |
[elpa] externals/modus-vivendi-theme b5dba7a 081/110: Internal: use defun for conditional Org src blocks |
Date: |
Wed, 29 Apr 2020 21:40:12 -0400 (EDT) |
branch: externals/modus-vivendi-theme
commit b5dba7a832e60d55f4bc68ab3b0e1abf45f211b5
Author: Protesilaos Stavrou <address@hidden>
Commit: Protesilaos Stavrou <address@hidden>
Internal: use defun for conditional Org src blocks
Just to make things a bit more abstract. In the future this function
may be generalised further to accept more parameters (will depend on the
needs of the project).
---
modus-operandi-theme.el | 12 +++++++++---
modus-vivendi-theme.el | 12 +++++++++---
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index 55450b8..8d48aa0 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -445,6 +445,14 @@ 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."
+ (if modus-operandi-theme-distinct-org-blocks
+ (list :background bgsrc :extend t)
+ (list :background bg)))
+
(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 modeline.
@@ -2388,9 +2396,7 @@ AMOUNT is a customisation option."
: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 (,@(and (>= emacs-major-version 27) '(:extend t))
- :background ,(if
modus-operandi-theme-distinct-org-blocks bg-dim bg-main)
- :foreground ,fg-main))))
+ `(org-block ((,class (,@(modus-operandi-theme-org-src-block bg-dim bg-main)
:foreground ,fg-main))))
`(org-block-begin-line ((,class (,@(and (>= emacs-major-version 27)
modus-operandi-theme-distinct-org-blocks
'(:extend t))
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 720f3ae..e308e81 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -445,6 +445,14 @@ 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."
+ (if modus-vivendi-theme-distinct-org-blocks
+ (list :background bgsrc :extend t)
+ (list :background bg)))
+
(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 modeline.
@@ -2388,9 +2396,7 @@ AMOUNT is a customisation option."
: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 (,@(and (>= emacs-major-version 27) '(:extend t))
- :background ,(if
modus-vivendi-theme-distinct-org-blocks bg-dim bg-main)
- :foreground ,fg-main))))
+ `(org-block ((,class (,@(modus-vivendi-theme-org-src-block bg-dim bg-main)
:foreground ,fg-main))))
`(org-block-begin-line ((,class (,@(and (>= emacs-major-version 27)
modus-vivendi-theme-distinct-org-blocks
'(:extend t))
- [elpa] externals/modus-vivendi-theme efdb292 062/110: Minor tweak to 3D modeline foreground, (continued)
- [elpa] externals/modus-vivendi-theme efdb292 062/110: Minor tweak to 3D modeline foreground, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme bd57c10 073/110: Clarify toggling of customisations in README, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme b874c79 058/110: NEW CUSTOM OPTION: 3d modeline for active window, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 9481730 076/110: New palette subset of nuanced accented backgrounds, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 5f8c9d5 078/110: Update README: improve discovery of custom options, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme bba4e77 045/110: Add support for IFLIPB, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 4e88341 051/110: Refine WRITEGOOD-MODE: use new lang colours, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 657adea 053/110: Draw a subtle border around the inactive modeline, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 8336e5a 061/110: Refine 3D modeline conditionality and tweak looks, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 7afc624 063/110: Improve README, especially docs on custom options, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme b5dba7a 081/110: Internal: use defun for conditional Org src blocks,
Stefan Monnier <=
- [elpa] externals/modus-vivendi-theme 0344a1b 101/110: Add support for MAN and WOMAN, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 37309fb 094/110: Internal: tweak Modus Vivendi "red-active" value, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 3d153f3 098/110: Add support for TUAREG, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme ead95c9 106/110: Use bespoke colour for contextually unfocused text, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 1742916 086/110: Internal: delete trailing whitespace, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 52a247a 087/110: Expand README with table of contents and more docs, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 44f75d3 107/110: Internal: refine Modus Operandi main green values, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 29078bd 109/110: Upgrade to version 0.8.0, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 95c073b 080/110: Add support for RCIRC, Stefan Monnier, 2020/04/29
- [elpa] externals/modus-vivendi-theme 1c605b3 085/110: Internal: improve function of "section headings", Stefan Monnier, 2020/04/29