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:
parent
d989f99386
commit
e7683a46af
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user