Refactor doom-big-font-mode
Complain if doom-font or doom-big-font aren't set.
This commit is contained in:
parent
6da307d30e
commit
461fc8e312
1 changed files with 11 additions and 6 deletions
|
@ -168,12 +168,17 @@ OPACITY is an integer between 0 to 100, inclusive."
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(define-minor-mode doom-big-font-mode
|
(define-minor-mode doom-big-font-mode
|
||||||
"A global mode that resizes the font, for streams, screen-sharing and
|
"A global mode that resizes the font, for streams, screen-sharing and
|
||||||
presentations."
|
presentations.
|
||||||
|
|
||||||
|
Uses `doom-big-font' when enabled."
|
||||||
:init-value nil
|
:init-value nil
|
||||||
:lighter " BIG"
|
:lighter " BIG"
|
||||||
:global t
|
:global t
|
||||||
(unless (fontp doom-big-font)
|
(unless doom-big-font
|
||||||
(user-error "`doom-big-font' isn't set to a valid font"))
|
(user-error "`doom-big-font' must be set to a valid font"))
|
||||||
(if doom-big-font-mode
|
(unless doom-font
|
||||||
(set-frame-font doom-big-font t t)
|
(user-error "`doom-font' must be set to a valid font"))
|
||||||
(set-frame-font doom-font t t)))
|
(set-frame-font (if doom-big-font-mode
|
||||||
|
doom-big-font
|
||||||
|
doom-font)
|
||||||
|
t t))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue