aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2012-08-23 08:19:27 -0400
committerStefan Monnier <[email protected]>2012-08-23 08:19:27 -0400
commitdb148c21a9bc379f5147d5dfc4f53504308e60bc (patch)
tree526c5132f957cb54554dd1d992d26686a04fdfe7
parentffe6eaf17d2dc721cd8daf9a88d61cb6a9731b5a (diff)
* lisp/files.el (safe-local-eval-forms): Fix before-save-hook entry to be
buffer-local; add delete-trailing-whitespace. Fixes: debbugs:12259
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el3
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6122c0b0f8..95d920b32e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-23 Stefan Monnier <[email protected]>
+
+ * 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 <[email protected]> (tiny change)
* progmodes/hideif.el (hif-compress-define-list):
diff --git a/lisp/files.el b/lisp/files.el
index 02c9e04311..5f83639d9c 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