Skip to content

Commit

Permalink
Prevent custom from writing font settings to custom.el
Browse files Browse the repository at this point in the history
Otherwise it tries to write unreadable forms to custom-file, causing
invalid-read errors at startup.
  • Loading branch information
hlissner committed May 22, 2021
1 parent 31ca03c commit 5aea22e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/core-ui.el
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,9 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
`((fixed-pitch-serif ((t (:font ,doom-serif-font))))))
(when doom-variable-pitch-font
`((variable-pitch ((t (:font ,doom-variable-pitch-font))))))))
;; Never save these settings to `custom-file'
(dolist (sym '(fixed-pitch fixed-pitch-serif variable-pitch))
(put sym 'saved-face nil))
(cond
(doom-font
;; I avoid `set-frame-font' at startup because it is expensive; doing extra,
Expand Down

0 comments on commit 5aea22e

Please sign in to comment.