Merge pull request #925 from edwintorok/fix-write-mode-fonts
Fix write mode fonts and format.el
This commit is contained in:
commit
f0ace87a4a
4 changed files with 24 additions and 21 deletions
|
@ -351,9 +351,9 @@ frame's window-system, the theme will be reloaded.")
|
||||||
((display-graphic-p)
|
((display-graphic-p)
|
||||||
(setq doom-font (face-attribute 'default :font))))
|
(setq doom-font (face-attribute 'default :font))))
|
||||||
(when doom-serif-font
|
(when doom-serif-font
|
||||||
(set-face-attribute 'fixed-pitch-serif t :font doom-serif-font))
|
(set-face-attribute 'fixed-pitch-serif nil :font doom-serif-font))
|
||||||
(when doom-variable-pitch-font
|
(when doom-variable-pitch-font
|
||||||
(set-face-attribute 'variable-pitch t :font doom-variable-pitch-font))
|
(set-face-attribute 'variable-pitch nil :font doom-variable-pitch-font))
|
||||||
;; Fallback to `doom-unicode-font' for Unicode characters
|
;; Fallback to `doom-unicode-font' for Unicode characters
|
||||||
(when (fontp doom-unicode-font)
|
(when (fontp doom-unicode-font)
|
||||||
(set-fontset-font t nil doom-unicode-font nil 'append)))
|
(set-fontset-font t nil doom-unicode-font nil 'append)))
|
||||||
|
|
|
@ -20,3 +20,24 @@
|
||||||
"Initializes `org-mode' specific settings for `+write-mode'."
|
"Initializes `org-mode' specific settings for `+write-mode'."
|
||||||
(when (eq major-mode 'org-mode)
|
(when (eq major-mode 'org-mode)
|
||||||
(+org-pretty-mode (if +write-mode +1 -1))))
|
(+org-pretty-mode (if +write-mode +1 -1))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +write|init-line-numbers ()
|
||||||
|
(display-line-numbers-mode (if +write-mode +1 -1)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +write|init-mixed-pitch ()
|
||||||
|
(mixed-pitch-mode (if +write-mode +1 -1)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun +write|init-visual-fill-column ()
|
||||||
|
(visual-fill-column-mode (if +write-mode +1 -1)))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(add-hook! '+write-mode-hook
|
||||||
|
#'(flyspell-mode
|
||||||
|
visual-line-mode
|
||||||
|
+write|init-mixed-pitch
|
||||||
|
+write|init-visual-fill-column
|
||||||
|
+write|init-line-numbers
|
||||||
|
+write|init-org-mode))
|
||||||
|
|
|
@ -6,24 +6,6 @@
|
||||||
(defvar +write-line-spacing nil
|
(defvar +write-line-spacing nil
|
||||||
"What to set `line-spacing' in `+write-mode'.")
|
"What to set `line-spacing' in `+write-mode'.")
|
||||||
|
|
||||||
(defun +write|init-line-numbers ()
|
|
||||||
(display-line-numbers-mode (if +write-mode +1 -1)))
|
|
||||||
|
|
||||||
(defun +write|init-mixed-pitch ()
|
|
||||||
(mixed-pitch-mode (if +write-mode +1 -1)))
|
|
||||||
|
|
||||||
(defun +write|init-visual-fill-column ()
|
|
||||||
(visual-fill-column-mode (if +write-mode +1 -1)))
|
|
||||||
|
|
||||||
(add-hook! '+write-mode-hook
|
|
||||||
#'(flyspell-mode
|
|
||||||
visual-line-mode
|
|
||||||
+write|init-mixed-pitch
|
|
||||||
+write|init-visual-fill-column
|
|
||||||
+write|init-line-numbers
|
|
||||||
+write|init-org-mode))
|
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;; Packages
|
;; Packages
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ Stolen shamelessly from go-mode"
|
||||||
(defun +format*probe (orig-fn)
|
(defun +format*probe (orig-fn)
|
||||||
"Use `+format-with' instead, if it is set."
|
"Use `+format-with' instead, if it is set."
|
||||||
(if +format-with
|
(if +format-with
|
||||||
(cons +format-with t)
|
(list +format-with t)
|
||||||
(funcall orig-fn)))
|
(funcall orig-fn)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue