Move background-mode fns to extended-faces
This commit is contained in:
parent
2e5bdb7316
commit
0aa7e06cee
|
@ -17,30 +17,6 @@
|
||||||
(nth 1 (assoc color-name solarized-colors)))
|
(nth 1 (assoc color-name solarized-colors)))
|
||||||
'(base02 red green yellow blue magenta cyan base2)))))
|
'(base02 red green yellow blue magenta cyan base2)))))
|
||||||
|
|
||||||
(cl-defun solarized-update-background-mode
|
|
||||||
(appearance &optional (frames (frame-list)))
|
|
||||||
"Set the APPEARANCE of all frames to either 'light or 'dark.
|
|
||||||
This is not specific to Solarized – it will update the appearance of any theme
|
|
||||||
that observes the background characteristic."
|
|
||||||
(setq frame-background-mode appearance)
|
|
||||||
(mapc #'frame-set-background-mode frames)
|
|
||||||
;; Supposedly #'frame-set-background-mode updates the faces, but it doesn’t
|
|
||||||
;; seem to actually., so re-enable all the themes.
|
|
||||||
(mapc #'enable-theme (reverse custom-enabled-themes))
|
|
||||||
;; For some reason, ‘enable-theme’ (or maybe ‘solarized’?) is resetting the
|
|
||||||
;; ‘frame-background-mode’, so reset it here.
|
|
||||||
(setq frame-background-mode appearance))
|
|
||||||
|
|
||||||
(defun solarized-toggle-background-mode ()
|
|
||||||
"Toggle between light and dark background modes.
|
|
||||||
This is not specific to Solarized – it will update the appearance of any theme
|
|
||||||
that observes the background characteristic."
|
|
||||||
(interactive)
|
|
||||||
(let ((new-mode (pcase frame-background-mode
|
|
||||||
('dark 'light)
|
|
||||||
(_ 'dark))))
|
|
||||||
(solarized-update-background-mode new-mode)))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(when load-file-name
|
(when load-file-name
|
||||||
(add-to-list 'custom-theme-load-path
|
(add-to-list 'custom-theme-load-path
|
||||||
|
|
Loading…
Reference in New Issue