[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/modus-operandi-theme 65a0c89 086/112: Add customisation
From: |
Stefan Monnier |
Subject: |
[elpa] externals/modus-operandi-theme 65a0c89 086/112: Add customisation option for distinct Org blocks |
Date: |
Mon, 30 Mar 2020 15:59:44 -0400 (EDT) |
branch: externals/modus-operandi-theme
commit 65a0c89a627b12330a4b500ae3538d61c95d41bf
Author: Protesilaos Stavrou <address@hidden>
Commit: Protesilaos Stavrou <address@hidden>
Add customisation option for distinct Org blocks
This is off by default, as with all customisation options.
The idea is to render `org-mode' source blocks in a different background
than that of the main buffer. Source block beginning and end lines are
configured to extend to the edge of the window when this option is set
to true.
Also tweak the background of the beginning and end lines of source
blocks, so that it differs from the block's contents.
---
README.org | 10 ++++++++++
modus-operandi-theme.el | 14 ++++++++++++--
modus-vivendi-theme.el | 14 ++++++++++++--
3 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/README.org b/README.org
index 8da0706..1ae0b11 100644
--- a/README.org
+++ b/README.org
@@ -150,6 +150,16 @@ theme of your choice):
(setq modus-operandi-theme-visible-fringes nil)
(setq modus-vivendi-theme-visible-fringes nil)
+
+;; Use a distinct background for Org's source blocks and extend their
+;; headings until the edge of the window (the "extend" part is for Emacs
+;; versions >= 27, whereas before they would extend anyhow). The
+;; default is to use the same background as the rest of the buffer,
+;; while beginning and end lines do not extend to the end of the window
+;; (again, the extend is for Emacs 27 or higher).
+(setq modus-operandi-theme-distinct-org-blocks nil)
+
+(setq modus-vivendi-theme-distinct-org-blocks nil)
#+END_SRC
*NOTE* that all customisation options must be declared /before/ loading
diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index 56ba429..52b6367 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -44,6 +44,7 @@
;; modus-operandi-theme-proportional-fonts
;; modus-operandi-theme-scale-headings
;; modus-operandi-theme-visible-fringes
+;; modus-operandi-theme-distinct-org-blocks
;;
;; The default scale is as follows (it can be customised as well):
;;
@@ -352,6 +353,10 @@ between foreground and background is >= 7:1)."
"Use a visible style for fringes."
:type 'boolean)
+(defcustom modus-operandi-theme-distinct-org-blocks nil
+ "Use a distinct background for `org-mode' source blocks."
+ :type 'boolean)
+
;; Define colour palette. Each colour must have a >= 7:1 contrast
;; ratio relative to the foreground/background colour it is rendered
;; against.
@@ -2070,8 +2075,13 @@ between foreground and background is >= 7:1)."
,@(when
modus-operandi-theme-scale-headings
(list :height
modus-operandi-theme-scale-3))))))
`(org-archived ((,class (:background ,bg-alt :foreground ,fg-alt))))
- `(org-block ((,class (:background ,bg-main :foreground ,fg-main))))
- `(org-block-begin-line ((,class (:background ,bg-dim :foreground
,fg-special-mild))))
+ `(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-begin-line ((,class (,@(and (>= emacs-major-version 27)
+
modus-operandi-theme-distinct-org-blocks
+ '(:extend t))
+ :background ,bg-alt :foreground
,fg-special-mild))))
`(org-block-end-line ((,class (:inherit org-block-begin-line))))
`(org-checkbox ((,class (:weight bold))))
`(org-checkbox-statistics-done ((,class (:foreground ,green :weight bold))))
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 51c9f48..ec44d4d 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -44,6 +44,7 @@
;; modus-vivendi-theme-proportional-fonts
;; modus-vivendi-theme-scale-headings
;; modus-vivendi-theme-visible-fringes
+;; modus-vivendi-theme-distinct-org-blocks
;;
;; The default scale is as follows (it can be customised as well):
;;
@@ -352,6 +353,10 @@ between foreground and background is >= 7:1)."
"Use a visible style for fringes."
:type 'boolean)
+(defcustom modus-vivendi-theme-distinct-org-blocks nil
+ "Use a distinct background for `org-mode' source blocks."
+ :type 'boolean)
+
;; Define colour palette. Each colour must have a >= 7:1 contrast
;; ratio relative to the foreground/background colour it is rendered
;; against.
@@ -2070,8 +2075,13 @@ between foreground and background is >= 7:1)."
,@(when
modus-vivendi-theme-scale-headings
(list :height
modus-vivendi-theme-scale-3))))))
`(org-archived ((,class (:background ,bg-alt :foreground ,fg-alt))))
- `(org-block ((,class (:background ,bg-main :foreground ,fg-main))))
- `(org-block-begin-line ((,class (:background ,bg-dim :foreground
,fg-special-mild))))
+ `(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-begin-line ((,class (,@(and (>= emacs-major-version 27)
+
modus-vivendi-theme-distinct-org-blocks
+ '(:extend t))
+ :background ,bg-alt :foreground
,fg-special-mild))))
`(org-block-end-line ((,class (:inherit org-block-begin-line))))
`(org-checkbox ((,class (:weight bold))))
`(org-checkbox-statistics-done ((,class (:foreground ,green :weight bold))))
- [elpa] externals/modus-operandi-theme d614a32 105/112: Use right colours for `gnus-summary-cancelled', (continued)
- [elpa] externals/modus-operandi-theme d614a32 105/112: Use right colours for `gnus-summary-cancelled', Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme adb7110 109/112: Internal: minor documentation corrections, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme e57ca4f 075/112: Use more appropriate colours for fringe indicators, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme b1660a9 080/112: Refine DIFF-HL and use new fringe colours, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme ee7ea51 087/112: Remove bold weight from matching parentheses, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme c4e0434 091/112: Add support for ORG-TREESCOPE, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme 3a6ebbc 093/112: Add support for CSV-MODE, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme 7890009 100/112: Merge branch 'fix-modus-vivendi-theme' into 'master', Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme 7dd0b0e 084/112: Add support for new FOUNTAIN-MODE heading faces, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme 413ea53 088/112: Remove bold weight from `smartparens`, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme 65a0c89 086/112: Add customisation option for distinct Org blocks,
Stefan Monnier <=
- [elpa] externals/modus-operandi-theme 7253615 094/112: Add support for DYNAMIC-RULER, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme 2e88ffa 095/112: Add support for GIT-WALKTREE, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme 6ce0247 099/112: Switched to using correct custom option for vivendi theme., Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme 5c22166 098/112: Add support for EBDB, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme c2da8a0 101/112: Add support for JULIA, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme c6aaf97 104/112: Update DIRED faces. Avoid hidden marks (issue 31)., Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme 1dd7c56 107/112: General refinements to `change-log' and `log-view', Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme 0394bdd 097/112: Add support for IOCCUR, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme c8f0af7 110/112: Make magit-log-{author, date} colours more distinct, Stefan Monnier, 2020/03/30
- [elpa] externals/modus-operandi-theme cedb331 111/112: Upgrade to version 0.7.0, Stefan Monnier, 2020/03/30