Mercurial > emacs
comparison lisp/files.el @ 4762:5eaa5d4eaaca
(local-write-file-hooks): Make this variable buffer-local.
author | Brian Fox <bfox@gnu.org> |
---|---|
date | Tue, 21 Sep 1993 07:23:26 +0000 |
parents | 97c1e7309a2d |
children | b040c520f090 |
comparison
equal
deleted
inserted
replaced
4761:fd03ee47c0b2 | 4762:5eaa5d4eaaca |
---|---|
183 (defvar find-file-hooks nil | 183 (defvar find-file-hooks nil |
184 "List of functions to be called after a buffer is loaded from a file. | 184 "List of functions to be called after a buffer is loaded from a file. |
185 The buffer's local variables (if any) will have been processed before the | 185 The buffer's local variables (if any) will have been processed before the |
186 functions are called.") | 186 functions 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. |
192 If one of them returns non-nil, the file is considered already written | 190 If one of them returns non-nil, the file is considered already written |
193 and the rest are not called. | 191 and the rest are not called. |
194 These hooks are considered to pertain to the visited file. | 192 These hooks are considered to pertain to the visited file. |
195 So this list is cleared if you change the visited file name. | 193 So this list is cleared if you change the visited file name. |
196 See also `write-contents-hooks'. | 194 See also `write-contents-hooks'. |
197 Don't make this variable buffer-local; instead, use `local-write-file-hooks'.") | 195 Don't make this variable buffer-local; instead, use `local-write-file-hooks'.") |
198 | 196 ;;; However, in case someone does make it local... |
199 (put 'local-write-file-hooks 'permanent-local t) | 197 (put 'write-file-hooks 'permanent-local t) |
198 | |
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. |
202 The functions in this list are called before the ones in | 201 The 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. |
207 If one of them returns non-nil, the file is considered already written | 208 If one of them returns non-nil, the file is considered already written |
208 and the rest are not called. | 209 and the rest are not called. |