dotfiles

🎜 Clone'em, tweak'em, stick'em in your $HOME 🎝
git clone https://git.kevinlegouguec.net/dotfiles
Log | Files | Refs | README

commit 679c995b3488feb12cc9ba028de6ac04e7956ee0
parent a6359015142bcf6dbb181f311dd56e308b77b73e
Author: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Date:   Thu, 16 Jun 2022 21:13:12 +0200

Remove Modus deuteranopia/bg-only kludge

Diffstat:
M.emacs | 42++----------------------------------------
1 file changed, 2 insertions(+), 40 deletions(-)

diff --git a/.emacs b/.emacs @@ -29,46 +29,10 @@ ;; Theming -;; AFAICT `modus-themes-deuteranopia' does not compose with -;; `modus-themes-diffs'. I like the red/blue palette, but I'd also -;; like to get desaturated backgrounds… *and* I'd also like -;; foregrounds to remain unset to keep syntax highlighting. Tough -;; customer, I know 😕 - -(defun my/modus-ediff-bg (face) - (require 'color) - (let ((old-bg (face-background face nil t))) - (if (equal (modus-themes--current-theme) 'modus-vivendi) - (color-darken-name old-bg 25) - (color-lighten-name old-bg 12)))) - -(defun my/modus-ediff-set-face (face) - (set-face-attribute - face nil - :inherit 'unspecified - :foreground 'unspecified - :background (my/modus-ediff-bg face))) - -(defun my/modus-ediff-face-list () - (require 'ediff-init) - (let ((kinds '("current" "fine")) - (targets '("A" "B" "C" "Ancestor"))) - (mapcan - (lambda (target) - (mapcar - (lambda (kind) - (let ((face-name (format "ediff-%s-diff-%s" kind target))) - (or (intern-soft face-name) - (error "Cannot find face named %s" face-name)))) - kinds)) - targets))) - -(defun my/modus-ediff () - (mapc 'my/modus-ediff-set-face (my/modus-ediff-face-list))) - (when (>= emacs-major-version 28) (setq modus-themes-bold-constructs t modus-themes-deuteranopia t + modus-themes-diffs 'bg-only modus-themes-headings '((1 . (variable-pitch 1.2)) (2 . (variable-pitch 1.15)) (3 . (variable-pitch 1.1)) @@ -80,9 +44,7 @@ modus-themes-prompts '(background) modus-themes-region '(bg-only) modus-themes-variable-pitch-ui t) - (load-theme 'modus-vivendi) - (my/modus-ediff) - (add-hook 'modus-themes-after-load-theme-hook 'my/modus-ediff)) + (load-theme 'modus-vivendi)) ;; Key bindings