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

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

[elpa] externals/modus-operandi-theme ea85175 87/99: New custom option f


From: Stefan Monnier
Subject: [elpa] externals/modus-operandi-theme ea85175 87/99: New custom option for intense hl-line
Date: Fri, 31 Jul 2020 09:25:31 -0400 (EDT)

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

    New custom option for intense hl-line
    
    This should also address issue 67:
    https://gitlab.com/protesilaos/modus-themes/-/issues/67
---
 README.org              | 19 +++++++++++++++++++
 modus-operandi-theme.el | 20 +++++++++++++++-----
 modus-vivendi-theme.el  | 20 +++++++++++++++-----
 3 files changed, 49 insertions(+), 10 deletions(-)

diff --git a/README.org b/README.org
index 864fab8..926c60e 100644
--- a/README.org
+++ b/README.org
@@ -549,6 +549,24 @@ this list):
 + [[https://github.com/larstvei/Focus][focus]]
 + [[https://github.com/tarsius/paren-face][paren-face]]
 
+** Option for intense line highlight (hl-line-mode)
+
+Symbol names:
+
++ =modus-operandi-theme-intense-hl-line=
++ =modus-vivendi-theme-intense-hl-line=
+
+Possible values:
+
+1. =nil= (default)
+2. =t=
+
+Draw the current line of =hl-line-mode= or its global equivalent in a more
+prominent background colour.  This would also affect several packages
+that enable =hl-line-mode=, such as =elfeed= and =mu4e=.
+
+The default is to use a more subtle grey.
+
 ** Option for intense standard completions
    :PROPERTIES:
    :CUSTOM_ID: h:5b0b1e66-8287-4f3f-ba14-011c29320a3f
@@ -626,6 +644,7 @@ being available.
         modus-operandi-theme-visible-fringes t
         modus-operandi-theme-3d-modeline t
         modus-operandi-theme-subtle-diffs t
+        modus-operandi-theme-intense-hl-line t
         modus-operandi-theme-intense-standard-completions t
         modus-operandi-theme-org-blocks 'greyscale
         modus-operandi-theme-variable-pitch-headings t
diff --git a/modus-operandi-theme.el b/modus-operandi-theme.el
index 94ce2e2..c60e686 100644
--- a/modus-operandi-theme.el
+++ b/modus-operandi-theme.el
@@ -50,6 +50,7 @@
 ;;     modus-operandi-theme-3d-modeline                    (boolean)
 ;;     modus-operandi-theme-subtle-diffs                   (boolean)
 ;;     modus-operandi-theme-faint-syntax                   (boolean)
+;;     modus-operandi-theme-intense-hl-line                (boolean)
 ;;     modus-operandi-theme-intense-standard-completions   (boolean)
 ;;     modus-operandi-theme-override-colors-alist          (alist)
 ;;
@@ -405,6 +406,7 @@ between foreground and background is >= 7:1)."
 (defface modus-theme-mark-del nil nil)
 (defface modus-theme-mark-sel nil nil)
 (defface modus-theme-mark-symbol nil nil)
+(defface modus-theme-hl-line nil nil)
 
 ;;; Customisation options
 
@@ -550,6 +552,10 @@ association list)."
   "Use prominent backgrounds for Icomplete, Ido, or similar."
   :type 'boolean)
 
+(defcustom modus-operandi-theme-intense-hl-line nil
+  "Use more prominent background for `hl-line-mode'."
+  :type 'boolean)
+
 (defcustom modus-operandi-theme-faint-syntax nil
   "Use less saturated colours for code syntax highlighting."
   :type 'boolean)
@@ -1003,6 +1009,10 @@ Also bind `class' to ((class color) (min-colors 89))."
    `(modus-theme-mark-del ((,class :inherit bold :background ,bg-mark-del 
:foreground ,fg-mark-del)))
    `(modus-theme-mark-sel ((,class :inherit bold :background ,bg-mark-sel 
:foreground ,fg-mark-sel)))
    `(modus-theme-mark-symbol ((,class :inherit bold :foreground ,blue-alt)))
+;;;;; other custom faces
+   `(modus-theme-hl-line ((,class :background ,(if 
modus-operandi-theme-intense-hl-line
+                                                   bg-active bg-hl-line)
+                                  (and (>= emacs-major-version 27) '(:extend 
t)))))
 ;;;; standard faces
 ;;;;; absolute essentials
    `(default ((,class :background ,bg-main :foreground ,fg-main)))
@@ -1387,7 +1397,7 @@ Also bind `class' to ((class color) (min-colors 89))."
    `(csv-separator-face ((,class :background ,bg-special-cold :foreground 
,fg-main)))
 ;;;;; ctrlf
    `(ctrlf-highlight-active ((,class :inherit (modus-theme-intense-green 
bold))))
-   `(ctrlf-highlight-line ((,class :background ,bg-hl-line)))
+   `(ctrlf-highlight-line ((,class :inherit modus-theme-hl-line)))
    `(ctrlf-highlight-passive ((,class :inherit modus-theme-refine-cyan)))
 ;;;;; custom (M-x customize)
    `(custom-button ((,class :box (:line-width 2 :color nil :style 
released-button)
@@ -2207,7 +2217,7 @@ Also bind `class' to ((class color) (min-colors 89))."
    `(highlight ((,class :inherit modus-theme-subtle-blue)))
    `(highlight-changes ((,class :foreground ,yellow-alt-other)))
    `(highlight-changes-delete ((,class :foreground ,red-alt-other :underline 
t)))
-   `(hl-line ((,class :background ,bg-hl-line)))
+   `(hl-line ((,class :inherit modus-theme-hl-line)))
    `(region ((,class :background ,bg-region :foreground ,fg-main)))
    `(secondary-selection ((,class :inherit modus-theme-special-cold)))
 ;;;;; highlight-blocks
@@ -2231,7 +2241,7 @@ Also bind `class' to ((class color) (min-colors 89))."
    `(hes-escape-backslash-face ((,class :inherit bold :foreground 
,fg-escape-char-construct)))
    `(hes-escape-sequence-face ((,class :inherit bold :foreground 
,fg-escape-char-backslash)))
 ;;;;; highlight-indentation
-   `(highlight-indentation-face ((,class :background ,bg-hl-line)))
+   `(highlight-indentation-face ((,class :inherit modus-theme-hl-line)))
    `(highlight-indentation-current-column-face ((,class :background 
,bg-active)))
 ;;;;; highlight-numbers
    `(highlight-numbers-number ((,class :foreground ,blue-alt-other)))
@@ -2731,7 +2741,7 @@ Also bind `class' to ((class color) (min-colors 89))."
    `(mu4e-footer-face ((,class :foreground ,fg-special-cold :slant 
,modus-theme-slant)))
    `(mu4e-forwarded-face ((,class :foreground ,green-alt-other)))
    `(mu4e-header-face ((,class :foreground ,fg-main)))
-   `(mu4e-header-highlight-face ((,class :background ,bg-hl-line)))
+   `(mu4e-header-highlight-face ((,class :inherit modus-theme-hl-line)))
    `(mu4e-header-key-face ((,class :foreground ,cyan)))
    `(mu4e-header-marks-face ((,class :inherit bold :foreground ,magenta-alt)))
    `(mu4e-header-title-face ((,class :foreground ,fg-special-mild)))
@@ -3351,7 +3361,7 @@ Also bind `class' to ((class color) (min-colors 89))."
        :foreground ,fg-lang-error :underline (:style wave))
       (,class :foreground ,fg-lang-error :underline t)))
 ;;;;; stripes
-   `(stripes ((,class :background ,bg-hl-line)))
+   `(stripes ((,class :inherit modus-theme-hl-line)))
 ;;;;; success
    `(suggest-heading ((,class :inherit bold :foreground ,yellow-alt-other)))
 ;;;;; switch-window
diff --git a/modus-vivendi-theme.el b/modus-vivendi-theme.el
index 6dc5c9a..ad0fadb 100644
--- a/modus-vivendi-theme.el
+++ b/modus-vivendi-theme.el
@@ -50,6 +50,7 @@
 ;;     modus-vivendi-theme-3d-modeline                    (boolean)
 ;;     modus-vivendi-theme-subtle-diffs                   (boolean)
 ;;     modus-vivendi-theme-faint-syntax                   (boolean)
+;;     modus-vivendi-theme-intense-hl-line                (boolean)
 ;;     modus-vivendi-theme-intense-standard-completions   (boolean)
 ;;     modus-vivendi-theme-override-colors-alist          (alist)
 ;;
@@ -405,6 +406,7 @@ between foreground and background is >= 7:1)."
 (defface modus-theme-mark-del nil nil)
 (defface modus-theme-mark-sel nil nil)
 (defface modus-theme-mark-symbol nil nil)
+(defface modus-theme-hl-line nil nil)
 
 ;;; Customisation options
 
@@ -550,6 +552,10 @@ association list)."
   "Use prominent backgrounds for Icomplete, Ido, or similar."
   :type 'boolean)
 
+(defcustom modus-vivendi-theme-intense-hl-line nil
+  "Use more prominent background for `hl-line-mode'."
+  :type 'boolean)
+
 (defcustom modus-vivendi-theme-faint-syntax nil
   "Use less saturated colours for code syntax highlighting."
   :type 'boolean)
@@ -1003,6 +1009,10 @@ Also bind `class' to ((class color) (min-colors 89))."
    `(modus-theme-mark-del ((,class :inherit bold :background ,bg-mark-del 
:foreground ,fg-mark-del)))
    `(modus-theme-mark-sel ((,class :inherit bold :background ,bg-mark-sel 
:foreground ,fg-mark-sel)))
    `(modus-theme-mark-symbol ((,class :inherit bold :foreground ,blue-alt)))
+;;;;; other custom faces
+   `(modus-theme-hl-line ((,class :background ,(if 
modus-vivendi-theme-intense-hl-line
+                                                   bg-active bg-hl-line)
+                                  (and (>= emacs-major-version 27) '(:extend 
t)))))
 ;;;; standard faces
 ;;;;; absolute essentials
    `(default ((,class :background ,bg-main :foreground ,fg-main)))
@@ -1387,7 +1397,7 @@ Also bind `class' to ((class color) (min-colors 89))."
    `(csv-separator-face ((,class :background ,bg-special-cold :foreground 
,fg-main)))
 ;;;;; ctrlf
    `(ctrlf-highlight-active ((,class :inherit (modus-theme-intense-green 
bold))))
-   `(ctrlf-highlight-line ((,class :background ,bg-hl-line)))
+   `(ctrlf-highlight-line ((,class :inherit modus-theme-hl-line)))
    `(ctrlf-highlight-passive ((,class :inherit modus-theme-refine-cyan)))
 ;;;;; custom (M-x customize)
    `(custom-button ((,class :box (:line-width 2 :color nil :style 
released-button)
@@ -2207,7 +2217,7 @@ Also bind `class' to ((class color) (min-colors 89))."
    `(highlight ((,class :inherit modus-theme-subtle-blue)))
    `(highlight-changes ((,class :foreground ,yellow-alt-other)))
    `(highlight-changes-delete ((,class :foreground ,red-alt-other :underline 
t)))
-   `(hl-line ((,class :background ,bg-hl-line)))
+   `(hl-line ((,class :inherit modus-theme-hl-line)))
    `(region ((,class :background ,bg-region :foreground ,fg-main)))
    `(secondary-selection ((,class :inherit modus-theme-special-cold)))
 ;;;;; highlight-blocks
@@ -2231,7 +2241,7 @@ Also bind `class' to ((class color) (min-colors 89))."
    `(hes-escape-backslash-face ((,class :inherit bold :foreground 
,fg-escape-char-construct)))
    `(hes-escape-sequence-face ((,class :inherit bold :foreground 
,fg-escape-char-backslash)))
 ;;;;; highlight-indentation
-   `(highlight-indentation-face ((,class :background ,bg-hl-line)))
+   `(highlight-indentation-face ((,class :inherit modus-theme-hl-line)))
    `(highlight-indentation-current-column-face ((,class :background 
,bg-active)))
 ;;;;; highlight-numbers
    `(highlight-numbers-number ((,class :foreground ,blue-alt-other)))
@@ -2731,7 +2741,7 @@ Also bind `class' to ((class color) (min-colors 89))."
    `(mu4e-footer-face ((,class :foreground ,fg-special-cold :slant 
,modus-theme-slant)))
    `(mu4e-forwarded-face ((,class :foreground ,green-alt-other)))
    `(mu4e-header-face ((,class :foreground ,fg-main)))
-   `(mu4e-header-highlight-face ((,class :background ,bg-hl-line)))
+   `(mu4e-header-highlight-face ((,class :inherit modus-theme-hl-line)))
    `(mu4e-header-key-face ((,class :foreground ,cyan)))
    `(mu4e-header-marks-face ((,class :inherit bold :foreground ,magenta-alt)))
    `(mu4e-header-title-face ((,class :foreground ,fg-special-mild)))
@@ -3351,7 +3361,7 @@ Also bind `class' to ((class color) (min-colors 89))."
        :foreground ,fg-lang-error :underline (:style wave))
       (,class :foreground ,fg-lang-error :underline t)))
 ;;;;; stripes
-   `(stripes ((,class :background ,bg-hl-line)))
+   `(stripes ((,class :inherit modus-theme-hl-line)))
 ;;;;; success
    `(suggest-heading ((,class :inherit bold :foreground ,yellow-alt-other)))
 ;;;;; switch-window



reply via email to

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