[Top][All Lists]

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

Add a hook for color-theme switching

From: stardiviner
Subject: Add a hook for color-theme switching
Date: Fri, 1 Dec 2017 18:45:53 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

Here is a case:

I use package =hl-sexp= to highlight sexp in Lisp code:

#+begin_src emacs-lisp
(use-package hl-sexp
  :ensure t
  (set-face-attribute 'hl-sexp-face nil
                      :background (cl-case (alist-get 'background-mode
                                     (color-darken-name (face-background
'default) 7))
(face-background 'default) 4)))

When I start Emacs, the face ~hl-sexp-face~ is been set by the Emacs
color-theme. Then I use package =circadian= to auto switch color-theme
or manually
switch color-theme with command =disable-theme= and =load-theme=. But
this face
~hl-sexp-face~ is defined already, usually not good for another switched

So I hope there is a hook for switching color-theme like
~color-theme-switch-hook~ etc.

This is useful for package =circadian=.

reply via email to

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