diff options
| author | Luc Teirlinck | 2004-01-07 20:51:14 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2004-01-07 20:51:14 +0000 |
| commit | 0eb0202fe2d81cfbb666663df2d3d822cb59f804 (patch) | |
| tree | 5b21a3781018228bbdaf40d5c413196b971bf7bb | |
| parent | 583c353d8b3c0cdf5ae13b9cb44ba19fd3251f0e (diff) | |
| download | emacs-0eb0202fe2d81cfbb666663df2d3d822cb59f804.tar.gz emacs-0eb0202fe2d81cfbb666663df2d3d822cb59f804.zip | |
(write-file-functions, write-contents-functions): Clarify docstrings.
| -rw-r--r-- | lisp/files.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el index e74ef0bcbc1..8519b74e104 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -375,7 +375,12 @@ So any buffer-local binding of this variable is discarded if you change | |||
| 375 | the visited file name with \\[set-visited-file-name], but not when you | 375 | the visited file name with \\[set-visited-file-name], but not when you |
| 376 | change the major mode. | 376 | change the major mode. |
| 377 | 377 | ||
| 378 | See also `write-contents-functions'.") | 378 | This hook is not run if any of the functions in |
| 379 | `write-contents-functions' returns non-nil. Both hooks pertain | ||
| 380 | to how to save a buffer to file, for instance, choosing a suitable | ||
| 381 | coding system and setting mode bits. (See Info | ||
| 382 | node `(elisp)Saving Buffers'.) To perform various checks or | ||
| 383 | updates before the buffer is saved, use `before-save-hook' .") | ||
| 379 | (put 'write-file-functions 'permanent-local t) | 384 | (put 'write-file-functions 'permanent-local t) |
| 380 | (defvaralias 'write-file-hooks 'write-file-functions) | 385 | (defvaralias 'write-file-hooks 'write-file-functions) |
| 381 | (make-obsolete-variable 'write-file-hooks 'write-file-functions "21.4") | 386 | (make-obsolete-variable 'write-file-hooks 'write-file-functions "21.4") |
| @@ -395,7 +400,11 @@ buffer's contents, not to the particular visited file; thus, | |||
| 395 | `set-visited-file-name' does not clear this variable; but changing the | 400 | `set-visited-file-name' does not clear this variable; but changing the |
| 396 | major mode does clear it. | 401 | major mode does clear it. |
| 397 | 402 | ||
| 398 | See also `write-file-functions'.") | 403 | For hooks that _do_ pertain to the particular visited file, use |
| 404 | `write-file-functions'. Both this variable and | ||
| 405 | `write-file-functions' relate to how a buffer is saved to file. | ||
| 406 | To perform various checks or updates before the buffer is saved, | ||
| 407 | use `before-save-hook'.") | ||
| 399 | (make-variable-buffer-local 'write-contents-functions) | 408 | (make-variable-buffer-local 'write-contents-functions) |
| 400 | (defvaralias 'write-contents-hooks 'write-contents-functions) | 409 | (defvaralias 'write-contents-hooks 'write-contents-functions) |
| 401 | (make-obsolete-variable 'write-contents-hooks 'write-contents-functions "21.4") | 410 | (make-obsolete-variable 'write-contents-hooks 'write-contents-functions "21.4") |