[Emacs] Add text-mode-hook for show-trailing-whitespace
This commit is contained in:
parent
0027d5fb86
commit
9048206704
@ -1306,10 +1306,15 @@ Set the default fill-column
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Show Trailing Whitespace
|
** Show Trailing Whitespace
|
||||||
Trailing whitespace is really messy and annoying, which makes this a must-have
|
Trailing whitespace is really messy and annoying, which makes this a must-have
|
||||||
in my opinion. It's kind of crazy how often you will encounter serious codebases
|
in my opinion. It's kind of crazy how often you will encounter serious codebases with random whitespace ALL over the place.
|
||||||
with random whitespace ALL over the place.
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(setq-default show-trailing-whitespace t)
|
(setq-default show-trailing-whitespace nil)
|
||||||
|
|
||||||
|
(defun imalison:show-trailing-whitespace ()
|
||||||
|
(interactive)
|
||||||
|
(setq show-trailing-whitespace t))
|
||||||
|
|
||||||
|
(add-hook 'text-mode-hook 'imalison:show-trailing-whitespace)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** Disable
|
*** Disable
|
||||||
Unfortunately, this setting can get annoying in a lot of modes, which is why I
|
Unfortunately, this setting can get annoying in a lot of modes, which is why I
|
||||||
|
Loading…
Reference in New Issue
Block a user