From 175794163598c4cda5b3f003066f697f4046919a Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Tue, 5 Jun 2018 16:07:32 -0700 Subject: [PATCH] add save hook correctly --- dotfiles/emacs.d/init.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index 1c89d3f..8205ef8 100644 --- a/dotfiles/emacs.d/init.el +++ b/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)