From 88096a81a9a5bb1af1df2d20fb36da658a215182 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 26 Jul 2019 13:57:42 +0200 Subject: [PATCH] merge whitespace-style with global value, not local And ensure it runs as late as possible in after-change-major-mode-hook. Hopefully to increase the probability of doom-highlight-non-default-indentation-h detecting a user-enabled whitespace-mode and bowing out in time. --- 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 83a8406a8..203ec91fc 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -141,7 +141,7 @@ read-only or not file-visiting." (set (make-local-variable 'whitespace-style) (let ((style (if indent-tabs-mode '(indentation) '(tabs tab-mark)))) (if whitespace-mode - (cl-union style whitespace-style) + (cl-union style (default-value 'whitespace-style)) `(face ,@style)))) (add-to-list 'whitespace-style 'face) (whitespace-mode +1))) @@ -649,7 +649,7 @@ startup (or theme switch) time, so long as `doom--prefer-theme-elc' is non-nil." (run-hook-wrapped 'doom-init-ui-hook #'doom-try-run-hook) (add-to-list 'kill-buffer-query-functions #'doom-protect-fallback-buffer-h nil 'eq) - (add-hook 'after-change-major-mode-hook #'doom-highlight-non-default-indentation-h) + (add-hook 'after-change-major-mode-hook #'doom-highlight-non-default-indentation-h 'append) ;; Initialize custom switch-{buffer,window,frame} hooks: ;; + `doom-switch-buffer-hook'