diff --git a/README.org b/README.org index 0c7d347..3a763ac 100644 --- a/README.org +++ b/README.org @@ -1142,17 +1142,47 @@ This setup prefers the ~leuven~ and ~leuven-dark~ themes from [[https://melpa.or very popular ~modus-operandi~ and ~modus-vivendi~ themes feel quirky: for instance those themes fail to display ~hl-line-mode~ with Emacs-27.2 on Darwin. +[[https://emacs.stackexchange.com/questions/17431/how-do-i-change-portions-of-a-custom-theme][How to change custom theme faces]] + #+attr_latex: :options bgcolor=LightGoldenrodYellow #+begin_src emacs-lisp (unless noninteractive ;; Try to detect `leuven-theme` from MELPA. (when (fboundp 'leuven-scale-font) (custom-set-variables - '(leuven-scale-org-agenda-structure nil) - '(leuven-scale-org-document-title nil) - '(leuven-scale-outline-headlines nil) - '(leuven-scale-volatile-highlight nil))) - (load-theme 'leuven 'no-confirm nil)) + '(leuven-scale-org-agenda-structure 1.0) + '(leuven-scale-org-document-title 1.0) + '(leuven-scale-outline-headlines 1.0) + '(leuven-scale-volatile-highlight 1.0))) + + (defun my-leuven-hook-function () + (when (member 'leuven custom-enabled-themes) + (let ((custom-inhibit--theme-enable nil) + (ol1 (list :height 1.0 :weight 'bold + :foreground "#3C3C3C" :background "#F0F0F0")) + (ol2 (list :height 1.0 :weight 'bold + :foreground "#123555" :background "#E5F4FB"))) + (custom-theme-set-faces + 'leuven + `(font-latex-sectioning-2-face ((t ,ol1))) + `(font-latex-sectioning-3-face ((t ,ol2))) + `(info-title-1 ((t ,ol1))) + `(markdown-header-face-1 ((t ,ol1))) + `(markdown-header-face-2 ((t ,ol2))) + `(org-level-1 ((t ,ol1))) + `(org-level-2 ((t ,ol2))) + `(outline-1 ((t ,ol1))) + `(outline-2 ((t ,ol1))))) + (enable-theme 'leuven))) + + (load-theme 'leuven 'no-confirm nil) + + (dolist (hook '(Info-mode-hook + latex-mode-hook + markdown-mode-hook + org-mode-hook + outline-mode-hook)) + (add-hook hook #'my-leuven-hook-function))) #+end_src #+attr_latex: :options bgcolor=LightGoldenrodYellow