aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Fox1993-09-21 07:23:26 +0000
committerBrian Fox1993-09-21 07:23:26 +0000
commitb19f1da4837b2c44e4a928893add8ff867c7bf27 (patch)
treefd10aaf1bbf29904cb5413a8bdb22a4241cab9ac
parent9c0415e0b53bdb7cf39753d2c7edddcffd31a361 (diff)
downloademacs-b19f1da4837b2c44e4a928893add8ff867c7bf27.tar.gz
emacs-b19f1da4837b2c44e4a928893add8ff867c7bf27.zip
(local-write-file-hooks): Make this variable buffer-local.
-rw-r--r--lisp/files.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 01d08ed0c71..92e0837157f 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -185,8 +185,6 @@ The functions are called in the order given until one of them returns non-nil.")
185The buffer's local variables (if any) will have been processed before the 185The buffer's local variables (if any) will have been processed before the
186functions are called.") 186functions are called.")
187 187
188;;; In case someone does make it local.
189(put 'write-file-hooks 'permanent-local t)
190(defvar write-file-hooks nil 188(defvar write-file-hooks nil
191 "List of functions to be called before writing out a buffer to a file. 189 "List of functions to be called before writing out a buffer to a file.
192If one of them returns non-nil, the file is considered already written 190If one of them returns non-nil, the file is considered already written
@@ -195,12 +193,15 @@ These hooks are considered to pertain to the visited file.
195So this list is cleared if you change the visited file name. 193So this list is cleared if you change the visited file name.
196See also `write-contents-hooks'. 194See also `write-contents-hooks'.
197Don't make this variable buffer-local; instead, use `local-write-file-hooks'.") 195Don't make this variable buffer-local; instead, use `local-write-file-hooks'.")
196;;; However, in case someone does make it local...
197(put 'write-file-hooks 'permanent-local t)
198 198
199(put 'local-write-file-hooks 'permanent-local t)
200(defvar local-write-file-hooks nil 199(defvar local-write-file-hooks nil
201 "Just like `write-file-hooks', except intended for per-buffer use. 200 "Just like `write-file-hooks', except intended for per-buffer use.
202The functions in this list are called before the ones in 201The functions in this list are called before the ones in
203`write-file-hooks'.") 202`write-file-hooks'.")
203(make-variable-buffer-local 'local-write-file-hooks)
204(put 'local-write-file-hooks 'permanent-local t)
204 205
205(defvar write-contents-hooks nil 206(defvar write-contents-hooks nil
206 "List of functions to be called before writing out a buffer to a file. 207 "List of functions to be called before writing out a buffer to a file.