>From 5f71b0dc3bc3b09cfb58d26ca6643b4e4a013a31 Mon Sep 17 00:00:00 2001 From: Mathieu Boespflug Date: Mon, 20 Aug 2012 14:25:49 -0400 Subject: [PATCH] files.el: say adding 'delete-trailing-whitespace to hooks is safe. --- lisp/files.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/files.el b/lisp/files.el index 5caa468..0b6f60f 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2837,7 +2837,9 @@ symbol and VAL is a value that is considered safe." ;; This should be here at least as long as Emacs supports write-file-hooks. '((add-hook 'write-file-hooks 'time-stamp) (add-hook 'write-file-functions 'time-stamp) - (add-hook 'before-save-hook 'time-stamp)) + (add-hook 'before-save-hook 'time-stamp) + (add-hook 'write-file-functions 'delete-trailing-whitespace) + (add-hook 'write-content-functions 'delete-trailing-whitespace)) "Expressions that are considered safe in an `eval:' local variable. Add expressions to this list if you want Emacs to evaluate them, when they appear in an `eval' local variable specification, without first -- 1.7.11.4