From 6859f77e1d175f75aee8c4be445b2b3c32777961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Sun, 30 Sep 2018 23:42:13 +0100 Subject: [PATCH 1/3] format.el: fix `Wrong type argument: listp, t` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The intention here was to build a list of two elements. Signed-off-by: Edwin Török --- modules/editor/format/autoload/format.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/format/autoload/format.el b/modules/editor/format/autoload/format.el index 4113effd5..23042b1de 100644 --- a/modules/editor/format/autoload/format.el +++ b/modules/editor/format/autoload/format.el @@ -101,7 +101,7 @@ Stolen shamelessly from go-mode" (defun +format*probe (orig-fn) "Use `+format-with' instead, if it is set." (if +format-with - (cons +format-with t) + (list +format-with t) (funcall orig-fn))) ;;;###autoload From 7795da48003e14b77d371b6aa9bc085af5cd00df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Wed, 3 Oct 2018 22:57:22 +0100 Subject: [PATCH 2/3] Fix doom-serif-font and doom-variable-pitch-font: they need to be set for current frame too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Emacs 26.1 these two font settings had no effect on the main frame. Signed-off-by: Edwin Török --- core/core-ui.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-ui.el b/core/core-ui.el index 21ca9e83e..d53775a6d 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -351,9 +351,9 @@ frame's window-system, the theme will be reloaded.") ((display-graphic-p) (setq doom-font (face-attribute 'default :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 - (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 (when (fontp doom-unicode-font) (set-fontset-font t nil doom-unicode-font nil 'append))) From 58dd73030c6d61e01a8e50f2836705f81517a865 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Wed, 3 Oct 2018 22:58:18 +0100 Subject: [PATCH 3/3] +write-mode: initialization functions were not run MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit setting +write-mode-hook had no effect because +write-mode-hook was not defined yet, it is only defined by the minor mode definition inside autoload.el (which didn't get autoloaded yet). Due to this when activating `+write-mode` the `mixed-pitch-mode` did not get activated. Fix this by moving these all to autoload. Signed-off-by: Edwin Török --- modules/app/write/autoload.el | 21 +++++++++++++++++++++ modules/app/write/config.el | 18 ------------------ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/modules/app/write/autoload.el b/modules/app/write/autoload.el index 46ebe462b..8a2f21044 100644 --- a/modules/app/write/autoload.el +++ b/modules/app/write/autoload.el @@ -20,3 +20,24 @@ "Initializes `org-mode' specific settings for `+write-mode'." (when (eq major-mode 'org-mode) (+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)) diff --git a/modules/app/write/config.el b/modules/app/write/config.el index ecb6adc01..a4b5e23bb 100644 --- a/modules/app/write/config.el +++ b/modules/app/write/config.el @@ -6,24 +6,6 @@ (defvar +write-line-spacing nil "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