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

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

[elpa] externals/modus-operandi-theme 432de28 108/112: Add support for V


From: Stefan Monnier
Subject: [elpa] externals/modus-operandi-theme 432de28 108/112: Add support for VC-ANNOTATE (but read commit msg)
Date: Mon, 30 Mar 2020 15:59:49 -0400 (EDT)

branch: externals/modus-operandi-theme
commit 432de281bd9c37a6ece0121abefcf7ae2439210a
Author: Protesilaos Stavrou <address@hidden>
Commit: Protesilaos Stavrou <address@hidden>

    Add support for VC-ANNOTATE (but read commit msg)
    
    It is impossible to support this command's background mode, as it would
    violate the accessibility standard of this project (WCAG AAA).  While it
    would be a shame to not support it at all given that it is built into
    Emacs and is quite useful overall.
    
    Quoting from the relevant note in the README:
    
        Due to the unique way `vc-annotate' (`C-x v g') applies colours,
        support for its background mode (`vc-annotate-background-mode') is
        disabled at the theme level.
    
        Normally, such a drastic measure should not belong in a theme:
        assuming the user's preferences is bad practice.  However, it has
        been deemed necessary in the interest of preserving colour contrast
        accessibility while still supporting a useful built-in tool.
    
        If there actually is a way to avoid such a course of action, without
        prejudice to the accessibility standard of this project, then please
        report as much (or contribute as per the information in the
        Contributing section).
---
 README.org              | 20 ++++++++++++++++++++
 modus-operandi-theme.el | 24 ++++++++++++++++++++++++
 modus-vivendi-theme.el  | 24 ++++++++++++++++++++++++
 3 files changed, 68 insertions(+)

diff --git a/README.org b/README.org
index cafb40b..de8ad81 100644
--- a/README.org
+++ b/README.org
@@ -365,6 +365,7 @@ the "full support" may not be 100% true…
 + treemacs
 + undo-tree
 + vc (built-in mode line status for version control)
++ vc-annotate (=C-x v g=)
 + visual-regexp
 + volatile-highlights
 + web-mode
@@ -461,6 +462,25 @@ ANSI colour number 1 (red) from the already-supported 
array of
 
 I presented 
[[https://gitlab.com/protesilaos/modus-themes/-/issues/21#note_302748582][some 
screen shots of this in issue 21]].
 
+** Note on VC-ANNOTATE-BACKGROUND-MODE
+   :PROPERTIES:
+   :CUSTOM_ID: h:5b5d4420-50cc-4d53-a9f8-825cba6b68f1
+   :END:
+
+Due to the unique way =vc-annotate= (=C-x v g=) applies colours, support for
+its background mode (=vc-annotate-background-mode=) is disabled at the
+theme level.
+
+Normally, such a drastic measure should not belong in a theme: assuming
+the user's preferences is bad practice.  However, it has been deemed
+necessary in the interest of preserving colour contrast accessibility
+while still supporting a useful built-in tool.
+
+If there actually is a way to avoid such a course of action, without
+prejudice to the accessibility standard of this project, then please
+report as much (or contribute as per the information in the 
[[#h:25ba8d6f-6604-4338-b774-bbe531d467f6][Contributing]]
+section).
+
 * Contributing
   :PROPERTIES:
   :CUSTOM_ID: h:25ba8d6f-6604-4338-b774-bbe531d467f6
diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index b9b137c..50f8b6b 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -242,6 +242,7 @@
 ;;     treemacs
 ;;     undo-tree
 ;;     vc (built-in mode line status for version control)
+;;     vc-annotate (C-x v g)
 ;;     visual-regexp
 ;;     volatile-highlights
 ;;     web-mode
@@ -2825,6 +2826,29 @@ between foreground and background is >= 7:1)."
         ("XXX+" . ,red-alt)
         ("REVIEW" . ,cyan-alt-other)
         ("DEPRECATED" . ,blue-nuanced)))
+    ;;;;; vc-annotate (C-x v g)
+    `(vc-annotate-background nil)
+    `(vc-annotate-background-mode nil)
+    `(vc-annotate-color-map
+      '((20 . ,red)
+        (40 . ,magenta)
+        (60 . ,magenta-alt)
+        (80 . ,red-alt)
+        (100 . ,yellow)
+        (120 . ,yellow-alt)
+        (140 . ,fg-special-warm)
+        (160 . ,fg-special-mild)
+        (180 . ,green)
+        (200 . ,green-alt)
+        (220 . ,cyan-alt-other)
+        (240 . ,cyan-alt)
+        (260 . ,cyan)
+        (280 . ,fg-special-cold)
+        (300 . ,blue)
+        (320 . ,blue-alt)
+        (340 . ,blue-alt-other)
+        (360 . ,magenta-alt-other)))
+    `(vc-annotate-very-old-color nil)
     ;;;; xterm-color
     `(xterm-color-names [,fg-main ,red ,green ,yellow ,blue ,magenta ,cyan 
,bg-alt])
     `(xterm-color-names-bright [,fg-alt ,red-alt ,green-alt ,yellow-alt 
,blue-alt ,magenta-alt ,cyan-alt ,bg-main]))))
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index b96529b..14c7798 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -242,6 +242,7 @@
 ;;     treemacs
 ;;     undo-tree
 ;;     vc (built-in mode line status for version control)
+;;     vc-annotate (C-x v g)
 ;;     visual-regexp
 ;;     volatile-highlights
 ;;     web-mode
@@ -2825,6 +2826,29 @@ between foreground and background is >= 7:1)."
         ("XXX+" . ,red-alt)
         ("REVIEW" . ,cyan-alt-other)
         ("DEPRECATED" . ,cyan-nuanced)))
+    ;;;;; vc-annotate (C-x v g)
+    `(vc-annotate-background nil)
+    `(vc-annotate-background-mode nil)
+    `(vc-annotate-color-map
+      '((20 . ,red)
+        (40 . ,magenta)
+        (60 . ,magenta-alt)
+        (80 . ,red-alt)
+        (100 . ,yellow)
+        (120 . ,yellow-alt)
+        (140 . ,fg-special-warm)
+        (160 . ,fg-special-mild)
+        (180 . ,green)
+        (200 . ,green-alt)
+        (220 . ,cyan-alt-other)
+        (240 . ,cyan-alt)
+        (260 . ,cyan)
+        (280 . ,fg-special-cold)
+        (300 . ,blue)
+        (320 . ,blue-alt)
+        (340 . ,blue-alt-other)
+        (360 . ,magenta-alt-other)))
+    `(vc-annotate-very-old-color nil)
     ;;;; xterm-color
     `(xterm-color-names [,bg-main ,red ,green ,yellow ,blue ,magenta ,cyan 
,fg-alt])
     `(xterm-color-names-bright [,bg-alt ,red-alt ,green-alt ,yellow-alt 
,blue-alt ,magenta-alt ,cyan-alt ,fg-main]))))



reply via email to

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