Change how themes, fonts & modelines are loaded
WARNING: THIS IS A BREAKING CHANGE FOR THEME/FONT/NLINUM CUSTOMIZATIONS. This change was motivated by the need to decouple theme and font loading from the ui/doom module. Now, it is doom-core's purview. Theme and fonts are loaded after initfiles are read (attached to the doom-init-ui-hook hook), giving other modules (especially private ones) a chance to change the theme or fonts. + Refactor core-ui.el + New init hook: doom-init-ui-hook + Decouple theme/font loading from ui/doom + Load modelines are doom-init-ui-hook + New theme/font variables (replaces old ui/doom variables) + doom-theme + doom-font + doom-variable-pitch-font + doom-unicode-font + Change nlinum variables + doom-line-number-lpad + doom-line-number-rpad + doom-line-number-pad-char Addresses #117
This commit is contained in:
parent
804fd31aab
commit
ecd8ad0f46
8 changed files with 147 additions and 132 deletions
|
@ -1,28 +0,0 @@
|
|||
;;; ui/doom/autoload/doom.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +doom/reset-theme ()
|
||||
"Reset the color theme currently in use."
|
||||
(interactive)
|
||||
(let ((theme (or (car-safe custom-enabled-themes) +doom-theme)))
|
||||
(when theme
|
||||
(mapc #'disable-theme custom-enabled-themes))
|
||||
(load "doom-themes-common.el" nil t)
|
||||
(+doom|init)
|
||||
(+doom|refresh-bright-buffers)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +doom|restore-bright-buffers (&rest _)
|
||||
"Restore `doom-buffer-mode' in buffers when `persp-mode' loads a session."
|
||||
(dolist (buf (persp-buffer-list))
|
||||
(with-current-buffer buf
|
||||
(+doom|buffer-mode-on))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +doom|refresh-bright-buffers ()
|
||||
"Refresh `doom-buffer-mode', in case of graphical glitches."
|
||||
(dolist (win (window-list))
|
||||
(when (buffer-local-value 'doom-buffer-mode (window-buffer win))
|
||||
(with-selected-window win
|
||||
(doom-buffer-mode -1)
|
||||
(doom-buffer-mode +1)))))
|
Loading…
Add table
Add a link
Reference in a new issue