Add an opt-out mechanism for deleting trailing whitespace on save
This commit is contained in:
parent
9a71355a13
commit
7f45bc0a6c
@ -166,7 +166,11 @@ Better keybinding.
|
||||
|
||||
Delete trailing whitespace on save:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'before-save-hook #'delete-trailing-whitespace)
|
||||
(defvar *should-delete-trailing-whitespace* t)
|
||||
(defun delete-trailing-whitespace-hook-fn ()
|
||||
(when *should-delete-trailing-whitespace*
|
||||
(delete-trailing-whitespace)))
|
||||
(add-hook 'before-save-hook #'delete-trailing-whitespace-hook-fn)
|
||||
#+END_SRC
|
||||
|
||||
* Autocompletion
|
||||
|
Loading…
Reference in New Issue
Block a user