From e7683a46af6b316dc52efb075a834d47c1dcf099 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Sun, 3 Feb 2019 08:24:47 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20start=20whitespace-mode=20in=20?= =?UTF-8?q?Org=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It doesn’t look too good anyway; also, it messes up my new custom faces soon to be introduced… --- configuration.org | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/configuration.org b/configuration.org index 395094f..ec2bd97 100644 --- a/configuration.org +++ b/configuration.org @@ -1191,14 +1191,16 @@ Because I’m a sysadmin, too. ~whitespace-mode~ is turned on by default, and can be toggled with ~F10~. #+BEGIN_SRC emacs-lisp -(defun prevent-whitespace-mode-for-magit () - "Prevent whitespace-mode from running in magit derived modes." - (not (derived-mode-p 'magit-mode))) +(defun prevent-whitespace-mode-for-some () + "Prevent whitespace-mode from running in some modes." + (and + (not (derived-mode-p 'magit-mode)) + (not (derived-mode-p 'org-mode)))) (use-package whitespace :demand :config - (add-function :before-while whitespace-enable-predicate 'prevent-whitespace-mode-for-magit) + (add-function :before-while whitespace-enable-predicate 'prevent-whitespace-mode-for-some) (global-whitespace-mode 1) (setq whitespace-line-column 100) :bind