Stop highlighting trailing whitespace in mail buffers
This commit is contained in:
parent
ca62086ff2
commit
829e433203
@ -2250,6 +2250,22 @@ Then configure ~real-auto-save-mode~
|
||||
|
||||
** Mailing with mu4e
|
||||
|
||||
Due to my programming (and maybe a bit of OCD) needs, i set trailing whitespace to have a red
|
||||
background so it stands out *a lot*. However, many emails contain a lot of trailing whitespace
|
||||
which makes them really hard to read in Emacs.
|
||||
|
||||
The below snippet creates a trailing whitespace face specific to mu4e view buffers. The
|
||||
accompanying function will be added to ~mu4e-view-mode-hook~.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(copy-face 'trailing-whitespace 'trailing-whitespace-mu4e)
|
||||
(set-face-attribute 'trailing-whitespace-mu4e nil :background 'unspecified)
|
||||
|
||||
(defun gpolonkai/mu4e-trailing-whitespace-fix ()
|
||||
(set (make-local-variable 'face-remapping-alist)
|
||||
'((trailing-whitespace trailing-whitespace-mu4e))))
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package mu4e
|
||||
:after helm
|
||||
@ -2293,6 +2309,8 @@ Then configure ~real-auto-save-mode~
|
||||
(mu4e-completing-read-function 'helm-comp-read)
|
||||
(mu4e-context-policy 'pick-first)
|
||||
(mu4e-confirm-quit nil)
|
||||
:hook
|
||||
(mu4e-view-mode . gpolonkai/mu4e-trailing-whitespace-fix)
|
||||
:bind
|
||||
(:map gpolonkai/pers-map
|
||||
("m m" . mu4e)
|
||||
|
Loading…
Reference in New Issue
Block a user