From db148c21a9bc379f5147d5dfc4f53504308e60bc Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 23 Aug 2012 08:19:27 -0400 Subject: [PATCH] * lisp/files.el (safe-local-eval-forms): Fix before-save-hook entry to be buffer-local; add delete-trailing-whitespace. Fixes: debbugs:12259 --- lisp/ChangeLog | 5 +++++ lisp/files.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6122c0b0f8d..95d920b32ec 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-08-23 Stefan Monnier + + * files.el (safe-local-eval-forms): Fix before-save-hook entry to be + buffer-local; add delete-trailing-whitespace (bug#12259). + 2012-08-22 Jeremy Moore (tiny change) * progmodes/hideif.el (hif-compress-define-list): diff --git a/lisp/files.el b/lisp/files.el index 02c9e04311e..5f83639d9cf 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -2842,7 +2842,8 @@ 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 nil t) + (add-hook 'before-save-hook 'delete-trailing-whitespace nil t)) "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