Browse Source

add save hook correctly

Taylor Bockman 7 years ago
parent
commit
44abdc818e
  1. 5
      dotfiles/emacs.d/init.el

5
dotfiles/emacs.d/init.el

@ -159,9 +159,10 @@ setq org-log-done t)
(let ((trailnewlines (abs (skip-chars-backward "\n\t"))))
(if (> trailnewlines 0)
(progn
(delete-char trailnewlines))))))
(delete-char trailnewlines)))))))
(add-hook 'before-save-hook 'delete-trailing-whitespace))
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(add-hook 'before-save-hook 'delete-trailing-blank-lines)
;; Comment this if you dont mind git diffs complaining about missing ending newlines.
(setq require-final-newline t)

Loading…
Cancel
Save