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

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

[elpa] externals/modus-operandi-theme 72d4723 57/99: Remove ':extend t'


From: Stefan Monnier
Subject: [elpa] externals/modus-operandi-theme 72d4723 57/99: Remove ':extend t' from all Org block options
Date: Fri, 31 Jul 2020 09:25:25 -0400 (EDT)

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

    Remove ':extend t' from all Org block options
    
    This is done in the interest of simplicity, as the previous design was
    prone to errors and was getting too complicated.
    
    Send feedback: https://gitlab.com/protesilaos/modus-themes/-/issues/57
---
 README.org              | 30 ++++++++++--------------------
 modus-operandi-theme.el | 14 ++++----------
 modus-vivendi-theme.el  | 14 ++++----------
 3 files changed, 18 insertions(+), 40 deletions(-)

diff --git a/README.org b/README.org
index ff2187d..984099b 100644
--- a/README.org
+++ b/README.org
@@ -201,16 +201,12 @@ fully fledged =use-package= declaration.
 + =modus-operandi-theme-distinct-org-blocks=
 + =modus-vivendi-theme-distinct-org-blocks=
 
-Use a distinct neutral background for Org's blocks and extend the
-background of their beginning and end lines to the edge of the window
-(the "extend" part is for Emacs versions >= 27, whereas before they
-would extend regardless).
+Use a distinct neutral background for Org's blocks.  This is the most
+subtle shade of grey used by each theme (it is more subtle than the one
+used for the begin/end lines of the blocks).
 
 The default is to use the same background as the rest of the buffer for
-the contents of the block.  The beginning and end lines do not extend to
-the end of the window, meaning that their background is only applied to
-the area covered by their respective keywords (again, the "extend" is
-only relevant for Emacs 27 or higher).
+the contents of the block.
 
 Also see: [[#h:3eebcc85-b104-4774-a742-6dc4dc3dd122][Option for colourful 
"rainbow" Org SRC blocks]].
 
@@ -240,18 +236,12 @@ combination of those two when enabled at the same time, 
and the
 out-of-the-box experience that the themes provide:
 
 #+NAME: modus-themes-org-blocks
-|                  | Block Background   | Beg/End bg       | Beg/End extend |
-|------------------+--------------------+------------------+----------------|
-| default          | None (white/black) | Subtle grey      | Maybe*         |
-| distinct blocks  | Most subtle grey   | Subtle grey      | Yes            |
-| rainbow blocks   | Accented           | Most subtle grey | No             |
-| distinct+rainbow | Mixed (per lang)   | Most subtle grey | Yes            |
-
-By "maybe" in the table above, I mean that we choose not to specify a
-value, letting upstream Org decide on what the standard face should look
-like with regard to the extent of its background.  This is consistent
-with the principle of least surprise.  For what it's worth, on my Emacs
-27 running Org 9.3, these lines do not have an =:extend t=.
+|                  | Block Background   | Beg/End bg       |
+|------------------+--------------------+------------------|
+| default          | None (white/black) | Subtle grey      |
+| distinct blocks  | Most subtle grey   | Subtle grey      |
+| rainbow blocks   | Accented           | Most subtle grey |
+| distinct+rainbow | Mixed (per lang)   | Most subtle grey |
 
 *Alternatively* you can avoid setting the "rainbow src blocks" option and
 instead specify your own language and face combinations, while still
diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index 223c841..0693bf1 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -561,8 +561,7 @@ as the rest of the buffer."
 (defun modus-operandi-theme-org-block-delim (bgaccent fgaccent bg fg)
   "Conditionally set the styles of Org block delimiters.
 BG, FG, BGACCENT, FGACCENT apply a background and foreground
-colour respectively and set the `:extend' attribute where
-applicable.
+colour respectively.
 
 The former pair is a greyscale combination that should be more
 distinct than the background of the block.
@@ -570,14 +569,9 @@ 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 modus-operandi-theme-distinct-org-blocks
-      (append
-       (and (>= emacs-major-version 27) '(:extend t))
-       (if modus-operandi-theme-rainbow-org-src-blocks
-           (list :background bgaccent :foreground fgaccent)
-         (list :background bg :foreground fg)))
-    (list :background bg :foreground fg
-          (and (>= emacs-major-version 27) '(:extend nil)))))
+  (if modus-operandi-theme-rainbow-org-src-blocks
+      (list :background bgaccent :foreground fgaccent)
+    (list :background bg :foreground fg)))
 
 (defun modus-operandi-theme-modeline-box (col3d col &optional btn int)
   "Control the box properties of the mode line.
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 59ff171..97ad217 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -561,8 +561,7 @@ as the rest of the buffer."
 (defun modus-vivendi-theme-org-block-delim (bgaccent fgaccent bg fg)
   "Conditionally set the styles of Org block delimiters.
 BG, FG, BGACCENT, FGACCENT apply a background and foreground
-colour respectively and set the `:extend' attribute where
-applicable.
+colour respectively.
 
 The former pair is a greyscale combination that should be more
 distinct than the background of the block.
@@ -570,14 +569,9 @@ 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 modus-vivendi-theme-distinct-org-blocks
-      (append
-       (and (>= emacs-major-version 27) '(:extend t))
-       (if modus-vivendi-theme-rainbow-org-src-blocks
-           (list :background bgaccent :foreground fgaccent)
-         (list :background bg :foreground fg)))
-    (list :background bg :foreground fg
-          (and (>= emacs-major-version 27) '(:extend nil)))))
+  (if modus-vivendi-theme-rainbow-org-src-blocks
+      (list :background bgaccent :foreground fgaccent)
+    (list :background bg :foreground fg)))
 
 (defun modus-vivendi-theme-modeline-box (col3d col &optional btn int)
   "Control the box properties of the mode line.



reply via email to

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