Don’t start whitespace-mode in Org mode

It doesn’t look too good anyway; also, it messes up my new custom faces soon to be introduced…
This commit is contained in:
Gergely Polonkai 2019-02-03 08:24:47 +01:00
parent d989f99386
commit e7683a46af

View File

@ -1191,14 +1191,16 @@ Because Im 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